update ignore_before_date_between_learning_steps_when_reviewing

This commit is contained in:
Jarrett Ye 2024-12-17 00:29:36 +08:00
parent 417cd19738
commit 72821d878f
2 changed files with 2 additions and 1 deletions

View file

@ -313,6 +313,7 @@ pub(crate) fn single_card_revlog_to_item(
if first_review.ease_factor <= 1.1 { if first_review.ease_factor <= 1.1 {
starting_state.difficulty = (first_review.ease_factor - 0.1) * 9.0 + 1.0; starting_state.difficulty = (first_review.ease_factor - 0.1) * 9.0 + 1.0;
} }
// remove the first review because it has been used to calculate the starting state
item.reviews.remove(0); item.reviews.remove(0);
Ok(Some(FsrsItemWithStartingState { Ok(Some(FsrsItemWithStartingState {
item, item,

View file

@ -605,7 +605,7 @@ pub(crate) mod tests {
convert_ignore_before(revlogs, false, days_ago_ms(9)) convert_ignore_before(revlogs, false, days_ago_ms(9))
.unwrap() .unwrap()
.len(), .len(),
1 2
); );
// | L L R // | L L R
assert_eq!( assert_eq!(