mirror of
https://github.com/ankitects/anki.git
synced 2025-12-10 21:36:55 -05:00
Fix formatting
This commit is contained in:
parent
88c75d73b6
commit
8f3c63bf0b
2 changed files with 10 additions and 11 deletions
|
|
@ -264,22 +264,21 @@ impl SqlWriter<'_> {
|
|||
days = days
|
||||
).unwrap()
|
||||
}
|
||||
PropertyKind::Position(pos) => {
|
||||
write!(
|
||||
self.sql,
|
||||
"(c.type = {t} and due {op} {pos})",
|
||||
t = CardType::New as u8,
|
||||
op = op,
|
||||
pos = pos
|
||||
).unwrap()
|
||||
}
|
||||
PropertyKind::Position(pos) => write!(
|
||||
self.sql,
|
||||
"(c.type = {t} and due {op} {pos})",
|
||||
t = CardType::New as u8,
|
||||
op = op,
|
||||
pos = pos
|
||||
)
|
||||
.unwrap(),
|
||||
PropertyKind::Interval(ivl) => write!(self.sql, "ivl {} {}", op, ivl).unwrap(),
|
||||
PropertyKind::Reps(reps) => write!(self.sql, "reps {} {}", op, reps).unwrap(),
|
||||
PropertyKind::Lapses(days) => write!(self.sql, "lapses {} {}", op, days).unwrap(),
|
||||
PropertyKind::Ease(ease) => {
|
||||
write!(self.sql, "factor {} {}", op, (ease * 1000.0) as u32).unwrap()
|
||||
}
|
||||
PropertyKind::Rated(days, ease) => self.write_rated(i64::from(*days), ease, op)?
|
||||
PropertyKind::Rated(days, ease) => self.write_rated(i64::from(*days), ease, op)?,
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ fn write_property(operator: &str, kind: &PropertyKind) -> String {
|
|||
EaseKind::AnswerButton(val) => format!("\"prop:rated{}{}:{}\"", operator, u, val),
|
||||
EaseKind::AnyAnswerButton => format!("\"prop:rated{}{}\"", operator, u),
|
||||
EaseKind::ManualReschedule => format!("\"prop:resched{}{}\"", operator, u),
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue