From bd67e9fe1b8c9951a7585810490ae5195f97296f Mon Sep 17 00:00:00 2001 From: Jarrett Ye Date: Sat, 3 May 2025 17:04:35 +0800 Subject: [PATCH] Fix/stability doesn't increase after pressing good (#3975) --- rslib/src/storage/card/data.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rslib/src/storage/card/data.rs b/rslib/src/storage/card/data.rs index dd3b33928..6545a6c60 100644 --- a/rslib/src/storage/card/data.rs +++ b/rslib/src/storage/card/data.rs @@ -85,7 +85,7 @@ impl CardData { pub(crate) fn convert_to_json(&mut self) -> Result { if let Some(v) = &mut self.fsrs_stability { - round_to_places(v, 3) + round_to_places(v, 4) } if let Some(v) = &mut self.fsrs_difficulty { round_to_places(v, 3) @@ -173,7 +173,7 @@ mod test { }; assert_eq!( data.convert_to_json().unwrap(), - r#"{"s":123.457,"d":1.235,"dr":0.99,"decay":0.123}"# + r#"{"s":123.4568,"d":1.235,"dr":0.99,"decay":0.123}"# ); } }