Fix clippy warnings

This commit is contained in:
gwenn
2019-02-02 11:37:26 +01:00
parent f695f185c2
commit 8862b17340
10 changed files with 18 additions and 18 deletions

View File

@@ -180,7 +180,7 @@ mod test {
array::load_module(&db).unwrap();
let v = vec![1i64, 2, 3, 4];
let values = v.into_iter().map(|i| Value::from(i)).collect();
let values = v.into_iter().map(Value::from).collect();
let ptr = Rc::new(values);
{
let mut stmt = db.prepare("SELECT value from rarray(?);").unwrap();

View File

@@ -366,7 +366,7 @@ mod test {
.query_map(NO_PARAMS, |row| row.get::<_, i32>(0))
.unwrap()
.collect();
let sum = ids.unwrap().iter().fold(0, |acc, &id| acc + id);
let sum = ids.unwrap().iter().sum::<i32>();
assert_eq!(sum, 15);
}
db.execute_batch("DROP TABLE vtab").unwrap();

View File

@@ -270,7 +270,7 @@ mod test {
#[test]
fn test_series_module() {
let version = unsafe { ffi::sqlite3_libversion_number() };
if version < 3008012 {
if version < 3_008_012 {
return;
}