Skip to content

Commit 586a84c

Browse files
committed
Unbox jiff zoned
1 parent c97ec86 commit 586a84c

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
@@ -288,7 +288,7 @@ pub enum Value {
288288

289289
#[cfg(feature = "with-jiff")]
290290
#[cfg_attr(docsrs, doc(cfg(feature = "with-jiff")))]
291-
JiffZoned(Option<Box<Zoned>>),
291+
JiffZoned(Option<Zoned>),
292292

293293
#[cfg(feature = "with-uuid")]
294294
#[cfg_attr(docsrs, doc(cfg(feature = "with-uuid")))]

src/value/with_jiff.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type_to_value!(civil::Date, JiffDate, Date);
55
type_to_value!(civil::Time, JiffTime, Time);
66
type_to_value!(civil::DateTime, JiffDateTime, DateTime);
77
type_to_value!(Timestamp, JiffTimestamp, Timestamp);
8-
type_to_box_value!(Zoned, JiffZoned, TimestampWithTimeZone);
8+
type_to_value!(Zoned, JiffZoned, TimestampWithTimeZone);
99

1010
impl Value {
1111
#[inline]
@@ -30,7 +30,7 @@ impl Value {
3030

3131
#[inline]
3232
pub fn jiff_zoned<T: Into<Option<Zoned>>>(v: T) -> Value {
33-
Value::JiffZoned(v.into().map(Into::into))
33+
Value::JiffZoned(v.into())
3434
}
3535
}
3636

@@ -85,7 +85,7 @@ impl Value {
8585

8686
pub fn as_ref_jiff_zoned(&self) -> Option<&Zoned> {
8787
match self {
88-
Self::JiffZoned(v) => v.as_deref(),
88+
Self::JiffZoned(v) => v.as_ref(),
8989
_ => panic!("not Value::JiffZoned"),
9090
}
9191
}

0 commit comments

Comments
 (0)