Fix clippy warnings

This commit is contained in:
gwenn
2020-08-17 20:07:56 +02:00
parent da2d2e371a
commit 2a7b11320f
4 changed files with 10 additions and 16 deletions

View File

@@ -143,10 +143,7 @@ impl FromSql for f64 {
impl FromSql for bool {
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self> {
i64::column_result(value).map(|i| match i {
0 => false,
_ => true,
})
i64::column_result(value).map(|i| !matches!(i, 0))
}
}