From 83c649b574d90667d23c8430baaebcd0ef933055 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 28 Jan 2022 17:20:40 +0700 Subject: Move `time` module from `iced_native` to `iced_core` --- native/Cargo.toml | 4 ---- native/src/lib.rs | 2 +- native/src/time.rs | 7 ------- 3 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 native/src/time.rs (limited to 'native') diff --git a/native/Cargo.toml b/native/Cargo.toml index 499ad29e..8f0aea6a 100644 --- a/native/Cargo.toml +++ b/native/Cargo.toml @@ -27,7 +27,3 @@ features = ["thread-pool"] [dependencies.iced_style] version = "0.3" path = "../style" - -[target.'cfg(target_arch = "wasm32")'.dependencies.instant] -version = "0.1" -features = ["wasm-bindgen"] diff --git a/native/src/lib.rs b/native/src/lib.rs index bd50c6b2..6d98f7d1 100644 --- a/native/src/lib.rs +++ b/native/src/lib.rs @@ -49,7 +49,6 @@ pub mod renderer; pub mod subscription; pub mod svg; pub mod text; -pub mod time; pub mod touch; pub mod user_interface; pub mod widget; @@ -70,6 +69,7 @@ mod debug; mod debug; pub use iced_core::alignment; +pub use iced_core::time; pub use iced_core::{ Alignment, Background, Color, Font, Length, Padding, Point, Rectangle, Size, Vector, diff --git a/native/src/time.rs b/native/src/time.rs deleted file mode 100644 index 5f95ee86..00000000 --- a/native/src/time.rs +++ /dev/null @@ -1,7 +0,0 @@ -//! Keep track of time, both in native and web platforms! - -#[cfg(target_arch = "wasm32")] -pub use instant::{Duration, Instant}; - -#[cfg(not(target_arch = "wasm32"))] -pub use std::time::{Duration, Instant}; -- cgit