diff --git a/.changes/instant.md b/.changes/instant.md new file mode 100644 index 000000000..03b2461d0 --- /dev/null +++ b/.changes/instant.md @@ -0,0 +1,5 @@ +--- +"tao": "minor" +--- + +Remove `instant` dependency, changed `StartCause::ResumeTimeReached`, `StartCause::WaitCancelled` and `ControlFlow::WaitUntil` to use `std::time::Instant` instead. diff --git a/Cargo.toml b/Cargo.toml index 9471dc19d..933559e68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,6 @@ serde = [ "dep:serde", "dpi/serde" ] members = [ "tao-macros" ] [dependencies] -instant = "0.1" lazy_static = "1" libc = "0.2" log = "0.4" diff --git a/examples/timer.rs b/examples/timer.rs index 4ba2d3f71..047c5039b 100644 --- a/examples/timer.rs +++ b/examples/timer.rs @@ -2,8 +2,8 @@ // Copyright 2021-2023 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 -use instant::Instant; use std::time::Duration; +use std::time::Instant; use tao::{ event::{Event, StartCause, WindowEvent}, diff --git a/src/event.rs b/src/event.rs index b0d916059..d6efde565 100644 --- a/src/event.rs +++ b/src/event.rs @@ -37,8 +37,8 @@ //! describes what happens in what order. //! //! [event_loop_run]: crate::event_loop::EventLoop::run -use instant::Instant; use std::path::PathBuf; +use std::time::Instant; use crate::{ dpi::{PhysicalPosition, PhysicalSize}, diff --git a/src/event_loop.rs b/src/event_loop.rs index 6565dde06..c27578d39 100644 --- a/src/event_loop.rs +++ b/src/event_loop.rs @@ -13,7 +13,7 @@ //! [create_proxy]: crate::event_loop::EventLoop::create_proxy //! [event_loop_proxy]: crate::event_loop::EventLoopProxy //! [send_event]: crate::event_loop::EventLoopProxy::send_event -use instant::Instant; +use std::time::Instant; use std::{error, fmt, marker::PhantomData, ops::Deref}; use crate::{