From 9205b4db3ad9341f64620b60c5d064589bfea4b0 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 12 Dec 2023 12:29:21 +1000 Subject: [PATCH] Fix error generating parameters when a parameter is 0 --- Cargo.lock | 2 +- Cargo.toml | 2 +- rslib/src/deckconfig/update.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b54c2a9ed..d7408a51c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1813,7 +1813,7 @@ dependencies = [ [[package]] name = "fsrs" version = "0.1.0" -source = "git+https://github.com/open-spaced-repetition/fsrs-rs.git?rev=6e5ff8826c507d2f4323f2d73dda785b45f450b4#6e5ff8826c507d2f4323f2d73dda785b45f450b4" +source = "git+https://github.com/open-spaced-repetition/fsrs-rs.git?rev=d8b2aad417346aaab9f72c399cde6119de1da52f#d8b2aad417346aaab9f72c399cde6119de1da52f" dependencies = [ "burn", "itertools 0.12.0", diff --git a/Cargo.toml b/Cargo.toml index 82faf955b..d7d7dfdfc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ rev = "184b2ca50ed39ca43da13f0b830a463861adb9ca" [workspace.dependencies.fsrs] git = "https://github.com/open-spaced-repetition/fsrs-rs.git" -rev = "6e5ff8826c507d2f4323f2d73dda785b45f450b4" +rev = "d8b2aad417346aaab9f72c399cde6119de1da52f" # path = "../../../fsrs-rs" [workspace.dependencies] diff --git a/rslib/src/deckconfig/update.rs b/rslib/src/deckconfig/update.rs index 70c26ccfe..401c0aa30 100644 --- a/rslib/src/deckconfig/update.rs +++ b/rslib/src/deckconfig/update.rs @@ -147,7 +147,7 @@ impl Collection { let weight_len = conf.inner.fsrs_weights.len(); if weight_len == 17 { for i in 0..17 { - if !conf.inner.fsrs_weights[i].is_normal() { + if !conf.inner.fsrs_weights[i].is_finite() { return Err(AnkiError::FsrsWeightsInvalid); } }