diff options
author | 2023-01-12 06:24:44 +0100 | |
---|---|---|
committer | 2023-01-12 06:25:59 +0100 | |
commit | c6d0046102bb6951bf0f1f6102f748199c5889e2 (patch) | |
tree | fe4b5212f4fc5dc6123c1441087f8b9d505679ce /native/src | |
parent | fc54d6ba31246157422d092914ba7c1e483129c4 (diff) | |
download | iced-c6d0046102bb6951bf0f1f6102f748199c5889e2.tar.gz iced-c6d0046102bb6951bf0f1f6102f748199c5889e2.tar.bz2 iced-c6d0046102bb6951bf0f1f6102f748199c5889e2.zip |
Use `instant` instead of `wasm-timer` in `iced_core`
Diffstat (limited to 'native/src')
-rw-r--r-- | native/src/widget/text_input.rs | 3 | ||||
-rw-r--r-- | native/src/window.rs | 3 | ||||
-rw-r--r-- | native/src/window/event.rs | 3 | ||||
-rw-r--r-- | native/src/window/redraw_request.rs | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs index e5b7d93a..8755b85d 100644 --- a/native/src/widget/text_input.rs +++ b/native/src/widget/text_input.rs @@ -18,6 +18,7 @@ use crate::layout; use crate::mouse::{self, click}; use crate::renderer; use crate::text::{self, Text}; +use crate::time::{Duration, Instant}; use crate::touch; use crate::widget; use crate::widget::operation::{self, Operation}; @@ -28,8 +29,6 @@ use crate::{ Rectangle, Shell, Size, Vector, Widget, }; -use instant::{Duration, Instant}; - pub use iced_style::text_input::{Appearance, StyleSheet}; /// A field that can be filled with text. diff --git a/native/src/window.rs b/native/src/window.rs index 94201059..bd92730d 100644 --- a/native/src/window.rs +++ b/native/src/window.rs @@ -12,8 +12,7 @@ pub use redraw_request::RedrawRequest; pub use user_attention::UserAttention; use crate::subscription::{self, Subscription}; - -use instant::Instant; +use crate::time::Instant; /// Subscribes to the frames of the window of the running application. /// diff --git a/native/src/window/event.rs b/native/src/window/event.rs index 64dd17d7..e2fb5e66 100644 --- a/native/src/window/event.rs +++ b/native/src/window/event.rs @@ -1,4 +1,5 @@ -use instant::Instant; +use crate::time::Instant; + use std::path::PathBuf; /// A window-related event. diff --git a/native/src/window/redraw_request.rs b/native/src/window/redraw_request.rs index be5bd757..3b4f0fd3 100644 --- a/native/src/window/redraw_request.rs +++ b/native/src/window/redraw_request.rs @@ -1,4 +1,4 @@ -use instant::Instant; +use crate::time::Instant; /// A request to redraw a window. #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] |