From 4908be62edf14e738a41855b9381fee59a796cc2 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 22 Dec 2023 13:58:10 +1000 Subject: [PATCH] Update FSRS We're on the commit prior to https://github.com/open-spaced-repetition/fsrs-rs/pull/141, as that is going to require work that will need to wait until after 23.12 --- Cargo.lock | 2 +- Cargo.toml | 2 +- rslib/src/scheduler/fsrs/memory_state.rs | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eeb731114..9bd99b400 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=d8b2aad417346aaab9f72c399cde6119de1da52f#d8b2aad417346aaab9f72c399cde6119de1da52f" +source = "git+https://github.com/open-spaced-repetition/fsrs-rs.git?rev=458ed0a55950a0719d4b9b676630638bc30b2d91#458ed0a55950a0719d4b9b676630638bc30b2d91" dependencies = [ "burn", "itertools 0.12.0", diff --git a/Cargo.toml b/Cargo.toml index d7d7dfdfc..2c508fb4d 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 = "d8b2aad417346aaab9f72c399cde6119de1da52f" +rev = "458ed0a55950a0719d4b9b676630638bc30b2d91" # path = "../../../fsrs-rs" [workspace.dependencies] diff --git a/rslib/src/scheduler/fsrs/memory_state.rs b/rslib/src/scheduler/fsrs/memory_state.rs index c0a337b6c..3e0793c97 100644 --- a/rslib/src/scheduler/fsrs/memory_state.rs +++ b/rslib/src/scheduler/fsrs/memory_state.rs @@ -341,7 +341,7 @@ mod tests { item.starting_state, Some(MemoryState { stability: 99.999954, - difficulty: 5.287041, + difficulty: 4.966779, }) ); let mut card = Card { @@ -352,8 +352,8 @@ mod tests { assert_eq!( card.memory_state, Some(FsrsMemoryState { - stability: 248.5813, - difficulty: 5.2646275, + stability: 248.65475, + difficulty: 4.9747725, }) ); // but if there's only a single revlog entry, we'll fall back on current card @@ -377,7 +377,7 @@ mod tests { card.memory_state, Some(FsrsMemoryState { stability: 122.99994, - difficulty: 7.0797696 + difficulty: 6.859577 }) ); Ok(()) @@ -401,7 +401,7 @@ mod tests { Some( MemoryState { stability: 99.999954, - difficulty: 9.857409 + difficulty: 9.793356 } .into() )