Use instant to fix Wasm target

This commit is contained in:
Héctor Ramón Jiménez 2023-01-12 05:26:39 +01:00
parent e2ddef7438
commit fc54d6ba31
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
9 changed files with 12 additions and 9 deletions

View file

@ -15,8 +15,9 @@ trace = ["iced_winit/trace"]
debug = ["iced_winit/debug"] debug = ["iced_winit/debug"]
system = ["iced_winit/system"] system = ["iced_winit/system"]
[dependencies.log] [dependencies]
version = "0.4" log = "0.4"
instant = "0.1"
[dependencies.glutin] [dependencies.glutin]
version = "0.29" version = "0.29"

View file

@ -15,8 +15,8 @@ use iced_winit::user_interface;
use iced_winit::{Clipboard, Command, Debug, Event, Proxy, Settings}; use iced_winit::{Clipboard, Command, Debug, Event, Proxy, Settings};
use glutin::window::Window; use glutin::window::Window;
use instant::Instant;
use std::mem::ManuallyDrop; use std::mem::ManuallyDrop;
use std::time::Instant;
#[cfg(feature = "tracing")] #[cfg(feature = "tracing")]
use tracing::{info_span, instrument::Instrument}; use tracing::{info_span, instrument::Instrument};

View file

@ -14,6 +14,7 @@ debug = []
twox-hash = { version = "1.5", default-features = false } twox-hash = { version = "1.5", default-features = false }
unicode-segmentation = "1.6" unicode-segmentation = "1.6"
num-traits = "0.2" num-traits = "0.2"
instant = "0.1"
[dependencies.iced_core] [dependencies.iced_core]
version = "0.6" version = "0.6"

View file

@ -28,7 +28,7 @@ use crate::{
Rectangle, Shell, Size, Vector, Widget, Rectangle, Shell, Size, Vector, Widget,
}; };
use std::time::{Duration, Instant}; use instant::{Duration, Instant};
pub use iced_style::text_input::{Appearance, StyleSheet}; pub use iced_style::text_input::{Appearance, StyleSheet};

View file

@ -13,7 +13,7 @@ pub use user_attention::UserAttention;
use crate::subscription::{self, Subscription}; use crate::subscription::{self, Subscription};
use std::time::Instant; use instant::Instant;
/// Subscribes to the frames of the window of the running application. /// Subscribes to the frames of the window of the running application.
/// ///

View file

@ -1,5 +1,5 @@
use instant::Instant;
use std::path::PathBuf; use std::path::PathBuf;
use std::time::Instant;
/// A window-related event. /// A window-related event.
#[derive(PartialEq, Eq, Clone, Debug)] #[derive(PartialEq, Eq, Clone, Debug)]

View file

@ -1,4 +1,4 @@
use std::time::Instant; use instant::Instant;
/// A request to redraw a window. /// A request to redraw a window.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]

View file

@ -21,6 +21,7 @@ application = []
window_clipboard = "0.2" window_clipboard = "0.2"
log = "0.4" log = "0.4"
thiserror = "1.0" thiserror = "1.0"
instant = "0.1"
[dependencies.winit] [dependencies.winit]
version = "0.27" version = "0.27"

View file

@ -24,8 +24,8 @@ use iced_native::user_interface::{self, UserInterface};
pub use iced_native::application::{Appearance, StyleSheet}; pub use iced_native::application::{Appearance, StyleSheet};
use instant::Instant;
use std::mem::ManuallyDrop; use std::mem::ManuallyDrop;
use std::time::Instant;
#[cfg(feature = "trace")] #[cfg(feature = "trace")]
pub use profiler::Profiler; pub use profiler::Profiler;