Skip to content

Commit

Permalink
fix chrono
Browse files Browse the repository at this point in the history
  • Loading branch information
conradludgate committed Mar 19, 2024
1 parent ffb00e5 commit 8f1fe44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postgres-types/src/chrono_04.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl<'a> FromSql<'a> for NaiveDate {
let jd = types::date_from_sql(raw)?;
base()
.date()
.checked_add_signed(Duration::days(i64::from(jd)))
.checked_add_signed(Duration::try_days(i64::from(jd)).unwrap())
.ok_or_else(|| "value too large to decode".into())
}

Expand Down

0 comments on commit 8f1fe44

Please sign in to comment.