diff --git a/rslib/src/search/sqlwriter.rs b/rslib/src/search/sqlwriter.rs index 3c9997529..ad326d49d 100644 --- a/rslib/src/search/sqlwriter.rs +++ b/rslib/src/search/sqlwriter.rs @@ -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(()) diff --git a/rslib/src/search/writer.rs b/rslib/src/search/writer.rs index 41109e09b..1715c11e3 100644 --- a/rslib/src/search/writer.rs +++ b/rslib/src/search/writer.rs @@ -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), - } + }, } }