Skip to content

Commit 6c2b602

Browse files
authored
Fix wasm32-unknown-unknown build (#655)
1 parent ff3255f commit 6c2b602

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

time/src/offset_date_time.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use deranged::RangedI64;
1616
use num_conv::prelude::*;
1717
use powerfmt::ext::FormatterExt as _;
1818
use powerfmt::smart_display::{self, FormatterOptions, Metadata, SmartDisplay};
19-
use time_core::convert::{Day, Hour, Minute, Nanosecond, Second};
19+
use time_core::convert::*;
2020

2121
use crate::date::{MAX_YEAR, MIN_YEAR};
2222
#[cfg(feature = "formatting")]
@@ -1614,7 +1614,7 @@ impl From<OffsetDateTime> for js_sys::Date {
16141614
let timestamp = (datetime.unix_timestamp_nanos()
16151615
/ Nanosecond::per(Millisecond).cast_signed().extend::<i128>())
16161616
as f64;
1617-
js_sys::Date::new(&timestamp.into())
1617+
Self::new(&timestamp.into())
16181618
}
16191619
}
16201620
// endregion trait impls

time/src/sys/local_offset_at/wasm_js.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use num_conv::prelude::*;
2+
13
use crate::convert::*;
24
use crate::{OffsetDateTime, UtcOffset};
35

0 commit comments

Comments
 (0)