Skip to content

Commit

Permalink
Fix wasm32-unknown-unknown build (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Feb 3, 2024
1 parent ff3255f commit 6c2b602
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions time/src/offset_date_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -1614,7 +1614,7 @@ impl From<OffsetDateTime> for js_sys::Date {
let timestamp = (datetime.unix_timestamp_nanos()
/ Nanosecond::per(Millisecond).cast_signed().extend::<i128>())
as f64;
js_sys::Date::new(&timestamp.into())
Self::new(&timestamp.into())
}
}
// endregion trait impls
2 changes: 2 additions & 0 deletions time/src/sys/local_offset_at/wasm_js.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use num_conv::prelude::*;

use crate::convert::*;
use crate::{OffsetDateTime, UtcOffset};

Expand Down

0 comments on commit 6c2b602

Please sign in to comment.