Use actual cards for optimal_retention

This commit is contained in:
Luc Mcgrady 2025-04-27 11:09:10 +01:00
parent 283c07d057
commit fa368969f8

View file

@ -21,7 +21,7 @@ impl Collection {
if req.days_to_simulate == 0 {
invalid_input!("no days to simulate")
}
let (config, _) = self.simulate_request_to_config(&req)?;
let (config, cards) = self.simulate_request_to_config(&req)?;
Ok(fsrs
.optimal_retention(
&config,
@ -33,7 +33,7 @@ impl Collection {
})
.is_ok()
},
None,
Some(cards),
)?
.clamp(0.7, 0.95))
}