mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Remove dead code in reviews_for_fsrs (#3958)
* Clarify logic in reviews_for_fsrs Prior to this change, the second check of `first_of_last_learn_entries` was dead code because the first check would always break out of the loop before it could succeed. Re-order the code for clarity and add a comment to explain the logic. * Update CONTRIBUTORS
This commit is contained in:
parent
92cfb7340e
commit
ef37952ba0
2 changed files with 5 additions and 2 deletions
|
@ -224,6 +224,7 @@ rreemmii-dev <https://github.com/rreemmii-dev>
|
|||
babofitos <https://github.com/babofitos>
|
||||
Jonathan Schoreels <https://github.com/JSchoreels>
|
||||
JL710
|
||||
Matt Brubeck <mbrubeck@limpet.net>
|
||||
|
||||
********************
|
||||
|
||||
|
|
|
@ -322,8 +322,6 @@ pub(crate) fn reviews_for_fsrs(
|
|||
if user_graded && entry.review_kind == RevlogReviewKind::Learning {
|
||||
first_of_last_learn_entries = Some(index);
|
||||
revlogs_complete = true;
|
||||
} else if first_of_last_learn_entries.is_some() {
|
||||
break;
|
||||
} else if matches!(
|
||||
(entry.review_kind, entry.ease_factor),
|
||||
(RevlogReviewKind::Manual, 0)
|
||||
|
@ -343,6 +341,10 @@ pub(crate) fn reviews_for_fsrs(
|
|||
} else {
|
||||
return None;
|
||||
}
|
||||
// Previous versions of Anki didn't add a revlog entry when the card was
|
||||
// reset.
|
||||
} else if first_of_last_learn_entries.is_some() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if training {
|
||||
|
|
Loading…
Reference in a new issue