summaryrefslogtreecommitdiffstats
path: root/native/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-01-12 05:26:39 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-01-12 05:26:39 +0100
commitfc54d6ba31246157422d092914ba7c1e483129c4 (patch)
tree4de3fc6a870506db7f87b389bdf94061e3ee7187 /native/src
parente2ddef74387bcd81859b56e47316c47d7b739a01 (diff)
downloadiced-fc54d6ba31246157422d092914ba7c1e483129c4.tar.gz
iced-fc54d6ba31246157422d092914ba7c1e483129c4.tar.bz2
iced-fc54d6ba31246157422d092914ba7c1e483129c4.zip
Use `instant` to fix Wasm target
Diffstat (limited to 'native/src')
-rw-r--r--native/src/widget/text_input.rs2
-rw-r--r--native/src/window.rs2
-rw-r--r--native/src/window/event.rs2
-rw-r--r--native/src/window/redraw_request.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs
index ae289069..e5b7d93a 100644
--- a/native/src/widget/text_input.rs
+++ b/native/src/widget/text_input.rs
@@ -28,7 +28,7 @@ use crate::{
Rectangle, Shell, Size, Vector, Widget,
};
-use std::time::{Duration, Instant};
+use instant::{Duration, Instant};
pub use iced_style::text_input::{Appearance, StyleSheet};
diff --git a/native/src/window.rs b/native/src/window.rs
index 6ebe15b1..94201059 100644
--- a/native/src/window.rs
+++ b/native/src/window.rs
@@ -13,7 +13,7 @@ pub use user_attention::UserAttention;
use crate::subscription::{self, Subscription};
-use std::time::Instant;
+use instant::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 16684222..64dd17d7 100644
--- a/native/src/window/event.rs
+++ b/native/src/window/event.rs
@@ -1,5 +1,5 @@
+use instant::Instant;
use std::path::PathBuf;
-use std::time::Instant;
/// A window-related event.
#[derive(PartialEq, Eq, Clone, Debug)]
diff --git a/native/src/window/redraw_request.rs b/native/src/window/redraw_request.rs
index 1377823a..be5bd757 100644
--- a/native/src/window/redraw_request.rs
+++ b/native/src/window/redraw_request.rs
@@ -1,4 +1,4 @@
-use std::time::Instant;
+use instant::Instant;
/// A request to redraw a window.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]