From f03df4ac3ad646858eb7a46aba193cf4bcbadb37 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Wed, 27 Apr 2022 21:52:40 +0200 Subject: [PATCH] =?UTF-8?q?target=5Falready=5Fexists=E2=86=92card=5Fordina?= =?UTF-8?q?l=5Falready=5Fexists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rslib/src/import_export/package/apkg/import/cards.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rslib/src/import_export/package/apkg/import/cards.rs b/rslib/src/import_export/package/apkg/import/cards.rs index de12a155d..6a87510c1 100644 --- a/rslib/src/import_export/package/apkg/import/cards.rs +++ b/rslib/src/import_export/package/apkg/import/cards.rs @@ -86,7 +86,7 @@ impl Context<'_> { impl CardContext<'_> { fn import_cards(&mut self, mut cards: Vec) -> Result<()> { for card in &mut cards { - if self.map_to_imported_note(card) && !self.target_already_exists(card) { + if self.map_to_imported_note(card) && !self.card_ordinal_already_exists(card) { self.add_card(card)?; } // TODO: could update existing card @@ -114,7 +114,7 @@ impl CardContext<'_> { } } - fn target_already_exists(&self, card: &Card) -> bool { + fn card_ordinal_already_exists(&self, card: &Card) -> bool { self.existing_cards .contains(&(card.note_id, card.template_idx)) }