mirror of
https://github.com/ankitects/anki.git
synced 2025-11-14 08:37:11 -05:00
Remove redundant FSRS revlog code
Closes https://github.com/open-spaced-repetition/fsrs-rs/issues/113
This commit is contained in:
parent
a58b2a986c
commit
59acde45a1
1 changed files with 0 additions and 16 deletions
|
|
@ -159,22 +159,6 @@ pub(crate) fn single_card_revlog_to_items(
|
||||||
unique_dates.insert(entry.days_elapsed(next_day_at))
|
unique_dates.insert(entry.days_elapsed(next_day_at))
|
||||||
});
|
});
|
||||||
|
|
||||||
// Old versions of Anki did not record Manual entries in the review log when
|
|
||||||
// cards were manually rescheduled. So we look for times when the card has
|
|
||||||
// gone from Review to Learning, indicating it has been reset, and remove
|
|
||||||
// entries after.
|
|
||||||
for (i, (a, b)) in entries.iter().tuple_windows().enumerate() {
|
|
||||||
if let (
|
|
||||||
RevlogReviewKind::Review | RevlogReviewKind::Relearning,
|
|
||||||
RevlogReviewKind::Learning,
|
|
||||||
) = (a.review_kind, b.review_kind)
|
|
||||||
{
|
|
||||||
// Remove entry and all following
|
|
||||||
entries.truncate(i + 1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Compute delta_t for each entry
|
// Compute delta_t for each entry
|
||||||
let delta_ts = iter::once(0)
|
let delta_ts = iter::once(0)
|
||||||
.chain(entries.iter().tuple_windows().map(|(previous, current)| {
|
.chain(entries.iter().tuple_windows().map(|(previous, current)| {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue