mirror of
https://github.com/isar/rusqlite.git
synced 2025-08-26 00:04:32 +08:00
Fix clippy warnings
This commit is contained in:
@@ -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();
|
||||
|
@@ -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();
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user