From 6c2b602a41c8babb0896f03c97cdfda4ce1c564b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Juli=C3=A1n=20Espina?= Date: Sat, 3 Feb 2024 04:33:40 +0000 Subject: [PATCH] Fix wasm32-unknown-unknown build (#655) --- time/src/offset_date_time.rs | 4 ++-- time/src/sys/local_offset_at/wasm_js.rs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/time/src/offset_date_time.rs b/time/src/offset_date_time.rs index 1c495cb38..750a3c633 100644 --- a/time/src/offset_date_time.rs +++ b/time/src/offset_date_time.rs @@ -16,7 +16,7 @@ use deranged::RangedI64; use num_conv::prelude::*; use powerfmt::ext::FormatterExt as _; use powerfmt::smart_display::{self, FormatterOptions, Metadata, SmartDisplay}; -use time_core::convert::{Day, Hour, Minute, Nanosecond, Second}; +use time_core::convert::*; use crate::date::{MAX_YEAR, MIN_YEAR}; #[cfg(feature = "formatting")] @@ -1614,7 +1614,7 @@ impl From for js_sys::Date { let timestamp = (datetime.unix_timestamp_nanos() / Nanosecond::per(Millisecond).cast_signed().extend::()) as f64; - js_sys::Date::new(×tamp.into()) + Self::new(×tamp.into()) } } // endregion trait impls diff --git a/time/src/sys/local_offset_at/wasm_js.rs b/time/src/sys/local_offset_at/wasm_js.rs index 3fb02e2f4..a985e7c48 100644 --- a/time/src/sys/local_offset_at/wasm_js.rs +++ b/time/src/sys/local_offset_at/wasm_js.rs @@ -1,3 +1,5 @@ +use num_conv::prelude::*; + use crate::convert::*; use crate::{OffsetDateTime, UtcOffset};