Skip to content

Commit b700b1a

Browse files
committed
fix(odbc): correct buffer assertion for date encoding test
1 parent 8ddcc7d commit b700b1a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sqlx-core/src/odbc/types/chrono.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -646,14 +646,13 @@ mod tests {
646646
let date = NaiveDate::from_ymd_opt(2020, 1, 2).unwrap();
647647
let result = <NaiveDate as Encode<Odbc>>::encode(date, &mut buf);
648648
assert!(matches!(result, crate::encode::IsNull::No));
649-
assert_eq!(buf.len(), 1);
650649
assert_eq!(
651-
buf[0],
652-
OdbcArgumentValue::Date(odbc_api::sys::Date {
650+
buf,
651+
vec![OdbcArgumentValue::Date(odbc_api::sys::Date {
653652
year: 2020,
654653
month: 1,
655654
day: 2,
656-
})
655+
})]
657656
);
658657
}
659658

0 commit comments

Comments
 (0)