Revert "Ensure minimum doesn't exceed maximum"

This reverts commit 37ce4e842601dc4198556c6157d0ddb61dfbe39c.

Also remove a stale comment that is no longer relevant after
b8ec76fb66
This commit is contained in:
Damien Elmes 2024-06-28 19:49:23 +08:00
parent 6d13221ae5
commit f98fbbf298
2 changed files with 1 additions and 5 deletions

View File

@ -33,7 +33,6 @@ static FUZZ_RANGES: [FuzzRange; 3] = [
impl<'a> StateContext<'a> {
/// Apply fuzz, respecting the passed bounds.
/// Caller must ensure reasonable bounds.
pub(crate) fn with_review_fuzz(&self, interval: f32, minimum: u32, maximum: u32) -> u32 {
with_review_fuzz(self.fuzz_factor, interval, minimum, maximum)
}

View File

@ -135,11 +135,8 @@ impl RelearnState {
fn answer_easy(self, ctx: &StateContext) -> ReviewState {
let scheduled_days = if let Some(states) = &ctx.fsrs_next_states {
let (mut minimum, maximum) = ctx.min_and_max_review_intervals(1);
// ensure 1 greater than good where possible
let good = ctx.with_review_fuzz(states.good.interval as f32, minimum, maximum);
if minimum < maximum {
minimum = good + 1;
}
minimum = good + 1;
let interval = states.easy.interval;
ctx.with_review_fuzz(interval as f32, minimum, maximum)
} else {