From e9537ce3cb40f66a0ea013f8702c725a04565df0 Mon Sep 17 00:00:00 2001 From: Asuka Minato Date: Thu, 26 Dec 2024 23:42:20 +0900 Subject: [PATCH 1/3] add doc check --- .github/workflows/check.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check.sh b/.github/workflows/check.sh index 3b0cc2f..c2c1a64 100755 --- a/.github/workflows/check.sh +++ b/.github/workflows/check.sh @@ -2,11 +2,7 @@ set -eux -o pipefail -cargo fmt --check || ( - echo - echo "Please run 'cargo fmt' to format the code." - exit 1 -) +cargo fmt --check cargo clippy -- -Dwarnings @@ -15,5 +11,7 @@ pushd tests/data/ wget https://github.com/open-spaced-repetition/fsrs-optimizer-burn/files/12394182/collection.anki21.zip unzip *.zip +RUSTDOCFLAGS="-D warnings" cargo doc --release + cargo install cargo-llvm-cov --locked SKIP_TRAINING=1 cargo llvm-cov --release From 3a3bc955e913a3f3ab90c059a998fc714d4d311e Mon Sep 17 00:00:00 2001 From: Asuka Minato Date: Thu, 26 Dec 2024 23:46:05 +0900 Subject: [PATCH 2/3] Update dataset.rs --- src/dataset.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dataset.rs b/src/dataset.rs index 043b143..de48a12 100644 --- a/src/dataset.rs +++ b/src/dataset.rs @@ -25,7 +25,7 @@ pub struct FSRSReview { pub rating: u32, /// The number of days that passed /// # Warning - /// [`delta_t`] for item first(initial) review must be 0 + /// `delta_t` for item first(initial) review must be 0 pub delta_t: u32, } From 3b5eb48931381a765f3f71f5090c57ffbd1d38bd Mon Sep 17 00:00:00 2001 From: Asuka Minato Date: Thu, 26 Dec 2024 23:46:50 +0900 Subject: [PATCH 3/3] Update inference.rs --- src/inference.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inference.rs b/src/inference.rs index bd095fd..f851536 100644 --- a/src/inference.rs +++ b/src/inference.rs @@ -72,7 +72,7 @@ pub fn next_interval(stability: f32, desired_retention: f32) -> f32 { impl FSRS { /// Calculate the current memory state for a given card's history of reviews. - /// In the case of truncated reviews, [starting_state] can be set to the value of + /// In the case of truncated reviews, `starting_state` can be set to the value of /// [FSRS::memory_state_from_sm2] for the first review (which should not be included /// in FSRSItem). If not provided, the card starts as new. /// Parameters must have been provided when calling FSRS::new().