From 0a60d795dcb3c4d27823689c1a257f50c17345a6 Mon Sep 17 00:00:00 2001 From: Jarrett Ye Date: Mon, 4 Aug 2025 15:21:00 +0800 Subject: [PATCH] Update documentation for is_reset method in RevlogEntry to clarify ease_factor condition --- rslib/src/revlog/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rslib/src/revlog/mod.rs b/rslib/src/revlog/mod.rs index 1c278eab8..67c185cb0 100644 --- a/rslib/src/revlog/mod.rs +++ b/rslib/src/revlog/mod.rs @@ -88,6 +88,9 @@ impl RevlogEntry { /// Returns true if this entry represents a reset operation. /// These entries are created when a card is reset using /// [`Collection::reschedule_cards_as_new`]. + /// The `ease_factor` should be 0 because + /// [`Collection::set_due_date`] also sets created `RevlogEntry` with + /// `RevlogReviewKind::Manual` but the `ease_factor` is not 0. pub(crate) fn is_reset(&self) -> bool { self.review_kind == RevlogReviewKind::Manual && self.ease_factor == 0 }