mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-23 08:49:27 +08:00
Fix clippy warning
This commit is contained in:
parent
3769d085ae
commit
87844c688e
@ -322,12 +322,12 @@ mod test {
|
||||
assert_eq!(dt, i);
|
||||
|
||||
db.execute("UPDATE foo set b = datetime(t)", &[]).unwrap(); // "YYYY-MM-DD HH:MM:SS"
|
||||
let b: NaiveDateTime = db.query_row("SELECT b FROM foo", &[], |r| r.get(0)).unwrap();
|
||||
assert_eq!(dt, b);
|
||||
let hms: NaiveDateTime = db.query_row("SELECT b FROM foo", &[], |r| r.get(0)).unwrap();
|
||||
assert_eq!(dt, hms);
|
||||
|
||||
db.execute("UPDATE foo set b = strftime('%Y-%m-%dT%H:%M', t)", &[]).unwrap();
|
||||
let b: NaiveDateTime = db.query_row("SELECT b FROM foo", &[], |r| r.get(0)).unwrap();
|
||||
assert_eq!(NaiveDateTime::new(date, NaiveTime::from_hms(23, 56, 0)), b);
|
||||
let hm: NaiveDateTime = db.query_row("SELECT b FROM foo", &[], |r| r.get(0)).unwrap();
|
||||
assert_eq!(NaiveDateTime::new(date, NaiveTime::from_hms(23, 56, 0)), hm);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user