diff --git a/rslib/src/scheduler/fsrs/params.rs b/rslib/src/scheduler/fsrs/params.rs index 724bf0336..c160fa027 100644 --- a/rslib/src/scheduler/fsrs/params.rs +++ b/rslib/src/scheduler/fsrs/params.rs @@ -260,15 +260,11 @@ pub(crate) fn single_card_revlog_to_items( ignore_revlogs_before: TimestampMillis, ) -> Option<(Vec, bool, usize, Vec)> { let mut first_of_last_learn_entries = None; - let mut first_relearn_entries = None; let mut non_manual_entries = None; let mut revlogs_complete = false; for (index, entry) in entries.iter().enumerate().rev() { if matches!(entry.button_chosen, 1..=4) { non_manual_entries = Some(index); - if entry.review_kind == RevlogReviewKind::Relearning { - first_relearn_entries = Some(index); - } } if matches!( (entry.review_kind, entry.button_chosen), @@ -325,8 +321,8 @@ pub(crate) fn single_card_revlog_to_items( } } } - if let Some(idx) = first_of_last_learn_entries.or(first_relearn_entries) { - // start from the (re)learning step + if let Some(idx) = first_of_last_learn_entries { + // start from the learning step if idx > 0 { entries.drain(..idx); } @@ -334,7 +330,7 @@ pub(crate) fn single_card_revlog_to_items( // when training, we ignore cards that don't have any learning steps return None; } else if let Some(idx) = non_manual_entries { - // if there are no (re)learning entries but there are non-manual entries, + // if there are no learning entries but there are non-manual entries, // we ignore all entries before the first non-manual entry if idx > 0 { entries.drain(..idx);