Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Nov 2, 2024
1 parent f8de9be commit edec90b
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions tests/any/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,16 @@ async fn it_has_chrono_fixed_offset() -> anyhow::Result<()> {
use sqlx_oldapi::types::chrono::{DateTime, FixedOffset};
assert_eq!(
DateTime::<FixedOffset>::parse_from_rfc3339("2020-01-02T12:00:00+02:00").unwrap(),
get_val::<DateTime<FixedOffset>>(
if cfg!(feature = "sqlite") {
"'2020-01-02 12:00:00+02:00'"
} else if cfg!(feature = "mssql") {
"CAST('2020-01-02 12:00:00+02:00' AS DATETIMEOFFSET)"
} else if cfg!(feature = "postgres") {
"'2020-01-02 12:00:00+02:00'::timestamptz"
} else {
eprintln!("DBMS not supported");
return Ok(())
}
)
get_val::<DateTime<FixedOffset>>(if cfg!(feature = "sqlite") {
"'2020-01-02 12:00:00+02:00'"
} else if cfg!(feature = "mssql") {
"CAST('2020-01-02 12:00:00+02:00' AS DATETIMEOFFSET)"
} else if cfg!(feature = "postgres") {
"'2020-01-02 12:00:00+02:00'::timestamptz"
} else {
eprintln!("DBMS not supported");
return Ok(());
})
.await?
);
Ok(())
Expand Down

0 comments on commit edec90b

Please sign in to comment.