mirror of
https://github.com/ankitects/anki.git
synced 2026-01-08 03:23:54 -05:00
use const
This commit is contained in:
parent
d2960e1038
commit
37e35974fc
1 changed files with 2 additions and 2 deletions
|
|
@ -434,10 +434,10 @@ impl SqlWriter<'_> {
|
||||||
let timing = self.col.timing_today()?;
|
let timing = self.col.timing_today()?;
|
||||||
(timing.days_elapsed, timing.next_day_at, timing.now)
|
(timing.days_elapsed, timing.next_day_at, timing.now)
|
||||||
};
|
};
|
||||||
let new_type = CardType::New as i8;
|
const NEW_TYPE: i8 = CardType::New as i8;
|
||||||
write!(
|
write!(
|
||||||
self.sql,
|
self.sql,
|
||||||
"case when c.type = {new_type} then false else (extract_fsrs_retrievability(c.data, case when c.odue !=0 then c.odue else c.due end, c.ivl, {elap}, {next_day_at}, {now}) {op} {r}) end"
|
"case when c.type = {NEW_TYPE} then false else (extract_fsrs_retrievability(c.data, case when c.odue !=0 then c.odue else c.due end, c.ivl, {elap}, {next_day_at}, {now}) {op} {r}) end"
|
||||||
)
|
)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue