mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Remove redundant is_finite() check
This commit is contained in:
parent
9a3bdca3d1
commit
cdcd8c600b
1 changed files with 0 additions and 5 deletions
|
@ -159,11 +159,6 @@ impl Collection {
|
||||||
|
|
||||||
// add/update provided configs
|
// add/update provided configs
|
||||||
for conf in &mut req.configs {
|
for conf in &mut req.configs {
|
||||||
// we can remove this once https://github.com/open-spaced-repetition/fsrs-rs/pull/217/files
|
|
||||||
// makes it into an FSRS release
|
|
||||||
if conf.inner.fsrs_weights.iter().any(|&w| !w.is_finite()) {
|
|
||||||
return Err(AnkiError::FsrsWeightsInvalid);
|
|
||||||
}
|
|
||||||
// check the provided parameters are valid before we save them
|
// check the provided parameters are valid before we save them
|
||||||
FSRS::new(Some(&conf.inner.fsrs_weights))?;
|
FSRS::new(Some(&conf.inner.fsrs_weights))?;
|
||||||
self.add_or_update_deck_config(conf)?;
|
self.add_or_update_deck_config(conf)?;
|
||||||
|
|
Loading…
Reference in a new issue