Anki/rslib
Jarrett Ye 62e01fe03a
Fix Cards with Missing Last Review Time During Database Check (#4237)
* Fix Cards with Missing Last Review Time During Database Check

* clippy

* Apply suggestions from code review

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>

* Apply suggestions from code review

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Add is_reset method to RevlogEntry and update scheduling logic

This commit introduces the `is_reset` method to the `RevlogEntry` struct, which identifies entries representing reset operations. Additionally, the scheduling logic in `memory_state.rs` and `params.rs` has been updated to utilize this new method, ensuring that reset entries are handled correctly during review scheduling.

* Implement is_cramming method in RevlogEntry and update scheduling logic

This commit adds the `is_cramming` method to the `RevlogEntry` struct, which identifies entries representing cramming operations. The scheduling logic in `params.rs` has been updated to utilize this new method, improving the clarity and maintainability of the code.

* Refactor rating logic in RevlogEntry and update related scheduling functions

This commit introduces a new `has_rating` method in the `RevlogEntry` struct to encapsulate the logic for checking if an entry has a rating. The scheduling logic in `params.rs` and the calculation of normal answer counts in `card.rs` have been updated to use this new method, enhancing code clarity and maintainability.

* update revlog test helper function to assign button_chosen correctly

* Refactor card property fixing logic to use CardFixStats struct

* Add one-way sync trigger for last review time updates in dbcheck

* Update documentation for is_reset method in RevlogEntry to clarify ease_factor condition

* Apply suggestions from code review

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Minor wording tweak

---------

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
2025-08-06 19:49:30 +10:00
..
benches Update Rust and Python deps (#2567) 2023-07-01 18:26:43 +10:00
i18n Update to Rust 1.88 2025-06-29 11:50:49 +07:00
io Launcher tweaks 2025-06-20 16:13:50 +07:00
linkchecker Migrate build system to uv (#4074) 2025-06-19 14:03:16 +07:00
process Provide better output when downloading versions fails 2025-07-24 20:23:43 +07:00
proto Switch to Ruff (#4119) 2025-06-29 14:38:35 +07:00
proto_gen lazy_static → once_cell → stabilized versions (#3447) 2024-09-30 23:35:06 +10:00
src Fix Cards with Missing Last Review Time During Database Check (#4237) 2025-08-06 19:49:30 +10:00
sync Refactor launcher + various tweaks 2025-06-27 16:10:12 +07:00
tests/support move linkchecker into separate crate 2021-12-20 17:27:43 +10:00
.gitignore initial Bazel conversion 2020-11-01 14:26:58 +10:00
bench.sh Update Rust and Python deps (#2567) 2023-07-01 18:26:43 +10:00
build.rs Fix building outside workspace 2023-07-02 18:22:44 +10:00
Cargo.toml Feat/Desired retention info graphs (#4199) 2025-07-28 18:55:08 +10:00
README.md Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
rust_interface.rs Update to Rust 1.88 2025-06-29 11:50:49 +07:00

Anki's Rust code.