mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
collapse if
statement
This commit is contained in:
parent
ecd1cf45e9
commit
38990fe68d
1 changed files with 5 additions and 7 deletions
|
@ -488,13 +488,11 @@ pub(crate) fn reviews_for_fsrs(
|
||||||
rating: entry.button_chosen as u32,
|
rating: entry.button_chosen as u32,
|
||||||
delta_t,
|
delta_t,
|
||||||
});
|
});
|
||||||
if idx >= skip {
|
if idx >= skip && (!training || current_reviews.last().unwrap().delta_t > 0) {
|
||||||
if !training || current_reviews.last().unwrap().delta_t > 0 {
|
let item = FSRSItem {
|
||||||
let item = FSRSItem {
|
reviews: current_reviews.clone(),
|
||||||
reviews: current_reviews.clone(),
|
};
|
||||||
};
|
items.push((entry.id, item));
|
||||||
items.push((entry.id, item));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if items.is_empty() {
|
if items.is_empty() {
|
||||||
|
|
Loading…
Reference in a new issue