diff --git a/src/types/chrono.rs b/src/types/chrono.rs index 9cc68f3c..37865d14 100644 --- a/src/types/chrono.rs +++ b/src/types/chrono.rs @@ -248,24 +248,24 @@ mod test { #[test] fn test_naive_date_time_param() -> Result<()> { let db = checked_memory_handle()?; - let result: bool = db.query_row( + let result: Result = db.query_row( "SELECT true WHERE ? BETWEEN (now()::Timestamp - INTERVAL '1 minute') AND (now()::Timestamp + INTERVAL '1 minute')", [Utc::now().naive_utc()], |r| r.get(0), - )?; - assert!(result); + ); + assert!(result.is_ok()); Ok(()) } #[test] fn test_date_time_param() -> Result<()> { let db = checked_memory_handle()?; - let result: bool = db.query_row( + let result: Result = db.query_row( "SELECT true WHERE ? BETWEEN (now()::Timestamp - INTERVAL '1 minute') AND (now()::Timestamp + INTERVAL '1 minute')", [Utc::now()], |r| r.get(0), - )?; - assert!(result); + ); + assert!(result.is_ok()); Ok(()) }