Skip to content

Commit 4dd7b74

Browse files
committed
Unbox jiff timestamp
1 parent 30ec4bb commit 4dd7b74

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ pub enum Value {
284284

285285
#[cfg(feature = "with-jiff")]
286286
#[cfg_attr(docsrs, doc(cfg(feature = "with-jiff")))]
287-
JiffTimestamp(Option<Box<Timestamp>>),
287+
JiffTimestamp(Option<Timestamp>),
288288

289289
#[cfg(feature = "with-jiff")]
290290
#[cfg_attr(docsrs, doc(cfg(feature = "with-jiff")))]

src/value/with_jiff.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use jiff::{Timestamp, Zoned, civil};
44
type_to_value!(civil::Date, JiffDate, Date);
55
type_to_value!(civil::Time, JiffTime, Time);
66
type_to_value!(civil::DateTime, JiffDateTime, DateTime);
7-
type_to_box_value!(Timestamp, JiffTimestamp, Timestamp);
7+
type_to_value!(Timestamp, JiffTimestamp, Timestamp);
88
type_to_box_value!(Zoned, JiffZoned, TimestampWithTimeZone);
99

1010
impl Value {
@@ -25,7 +25,7 @@ impl Value {
2525

2626
#[inline]
2727
pub fn jiff_timestamp<T: Into<Option<Timestamp>>>(v: T) -> Value {
28-
Value::JiffTimestamp(v.into().map(Into::into))
28+
Value::JiffTimestamp(v.into())
2929
}
3030

3131
#[inline]
@@ -78,7 +78,7 @@ impl Value {
7878

7979
pub fn as_ref_jiff_timestamp(&self) -> Option<&Timestamp> {
8080
match self {
81-
Self::JiffTimestamp(v) => v.as_deref(),
81+
Self::JiffTimestamp(v) => v.as_ref(),
8282
_ => panic!("not Value::JiffTimestamp"),
8383
}
8484
}

0 commit comments

Comments
 (0)