-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Rust pipeline #4133
fix: Rust pipeline #4133
Conversation
CodSpeed Performance ReportMerging #4133 will degrade performances by 15.29%Comparing Summary
Benchmarks breakdown
|
@@ -364,7 +364,7 @@ fn read_scalar_value(bson: Bson, meta: &ScalarOutputMeta) -> crate::Result<Prism | |||
// DateTime | |||
(TypeIdentifier::DateTime, Bson::DateTime(dt)) => PrismaValue::DateTime(dt.to_chrono().into()), | |||
(TypeIdentifier::DateTime, Bson::Timestamp(ts)) => { | |||
PrismaValue::DateTime(Utc.timestamp(ts.time as i64, 0).into()) | |||
PrismaValue::DateTime(Utc.timestamp_opt(ts.time as i64, 0).unwrap().into()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pasting here the implementation of Utc::timestamp
for the reviewer's convenience:
/// Makes a new `DateTime` from the number of non-leap seconds
/// since January 1, 1970 0:00:00 UTC (aka "UNIX timestamp")
/// and the number of nanoseconds since the last whole non-leap second.
///
/// Panics on the out-of-range number of seconds and/or invalid nanosecond,
/// for a non-panicking version see [`timestamp_opt`](#method.timestamp_opt).
#[deprecated(since = "0.4.23", note = "use `timestamp_opt()` instead")]
fn timestamp(&self, secs: i64, nsecs: u32) -> DateTime<Self> {
self.timestamp_opt(secs, nsecs).unwrap()
}
Copy-pasting my comment from slack here:
|
This PR:
#[allow(deprecated)]
oncuid::cuid()
(as we're not yet ready to switch tocuid2()
, see Slack).chrono
methods with analogous implementationsWe note that, previously:
insta
being accidentally updated to1.31.0
rather than1.21.2