diff --git a/Cargo.lock b/Cargo.lock index 5fccf636b..9643c9bff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1864,9 +1864,9 @@ dependencies = [ [[package]] name = "fsrs" -version = "1.2.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a6f86707f3588ae410917427aa986e8b281fd0fad96480afd150f3e694c0d76" +checksum = "1bbd56ab9e6c5d40802c7f73701b9cc4bccf9fa29037799a94ac9f1a94f1a5f7" dependencies = [ "burn", "itertools 0.12.1", diff --git a/Cargo.toml b/Cargo.toml index b2c7e8ff3..513340be0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ git = "https://github.com/ankitects/linkcheck.git" rev = "184b2ca50ed39ca43da13f0b830a463861adb9ca" [workspace.dependencies.fsrs] -version = "1.2.0" +version = "1.2.2" # git = "https://github.com/open-spaced-repetition/fsrs-rs.git" # rev = "58ca25ed2bc4bb1dc376208bbcaed7f5a501b941" # path = "../open-spaced-repetition/fsrs-rs" diff --git a/cargo/licenses.json b/cargo/licenses.json index 6cb62274c..cb6768817 100644 --- a/cargo/licenses.json +++ b/cargo/licenses.json @@ -1225,7 +1225,7 @@ }, { "name": "fsrs", - "version": "1.2.0", + "version": "1.2.2", "authors": "Open Spaced Repetition", "repository": "https://github.com/open-spaced-repetition/fsrs-rs", "license": "BSD-3-Clause", diff --git a/rslib/src/scheduler/fsrs/error.rs b/rslib/src/scheduler/fsrs/error.rs index 7edd2c9e0..5c9f030ee 100644 --- a/rslib/src/scheduler/fsrs/error.rs +++ b/rslib/src/scheduler/fsrs/error.rs @@ -20,6 +20,13 @@ impl From for AnkiError { backtrace: None, }, }, + FSRSError::InvalidDeckSize => AnkiError::InvalidInput { + source: InvalidInputError { + message: "no cards to simulate".to_string(), + source: None, + backtrace: None, + }, + }, } } } diff --git a/ts/routes/deck-options/FsrsOptions.svelte b/ts/routes/deck-options/FsrsOptions.svelte index 319095e3e..905f41c13 100644 --- a/ts/routes/deck-options/FsrsOptions.svelte +++ b/ts/routes/deck-options/FsrsOptions.svelte @@ -319,8 +319,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html () => {}, ); } finally { + simulateProgressString = ""; if (resp) { - simulateProgressString = ""; const dailyTimeCost = movingAverage( resp.dailyTimeCost, Math.round(simulateFsrsRequest.daysToSimulate / 50), @@ -420,7 +420,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
- {tr.deckConfigComputeOptimalRetention()} (experimental) + {tr.deckConfigComputeOptimalRetention()}