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,15 +488,13 @@ pub(crate) fn reviews_for_fsrs(
|
|||
rating: entry.button_chosen as u32,
|
||||
delta_t,
|
||||
});
|
||||
if idx >= skip {
|
||||
if !training || current_reviews.last().unwrap().delta_t > 0 {
|
||||
if idx >= skip && (!training || current_reviews.last().unwrap().delta_t > 0) {
|
||||
let item = FSRSItem {
|
||||
reviews: current_reviews.clone(),
|
||||
};
|
||||
items.push((entry.id, item));
|
||||
}
|
||||
}
|
||||
}
|
||||
if items.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue