diff --git a/CHANGELOG.md b/CHANGELOG.md index 265549a..f21e1fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.13.3 + +- Use `web-time` instead of `instant`. + See [PR 191](https://github.com/libp2p/rust-yamux/pull/191). + # 0.13.2 - Bound `Active`'s `pending_frames` to enforce backpressure. diff --git a/yamux/Cargo.toml b/yamux/Cargo.toml index c6698bb..3694f75 100644 --- a/yamux/Cargo.toml +++ b/yamux/Cargo.toml @@ -11,13 +11,13 @@ edition = "2021" [dependencies] futures = { version = "0.3.12", default-features = false, features = ["std", "executor"] } -instant = "0.1" log = "0.4.8" nohash-hasher = "0.2" parking_lot = "0.12" rand = "0.8.3" static_assertions = "1" pin-project = "1.1.0" +web-time = "1.1.0" [dev-dependencies] futures = { version = "0.3.12", default-features = false, features = ["executor"] } diff --git a/yamux/src/connection/rtt.rs b/yamux/src/connection/rtt.rs index 5987b70..97dd6c5 100644 --- a/yamux/src/connection/rtt.rs +++ b/yamux/src/connection/rtt.rs @@ -12,8 +12,8 @@ use std::sync::Arc; -use instant::{Duration, Instant}; use parking_lot::Mutex; +use web_time::{Duration, Instant}; use crate::connection::Action; use crate::frame::{header::Ping, Frame}; diff --git a/yamux/src/connection/stream/flow_control.rs b/yamux/src/connection/stream/flow_control.rs index 4fa15bd..5ebf11c 100644 --- a/yamux/src/connection/stream/flow_control.rs +++ b/yamux/src/connection/stream/flow_control.rs @@ -1,7 +1,7 @@ use std::{cmp, sync::Arc}; -use instant::Instant; use parking_lot::Mutex; +use web_time::Instant; use crate::{connection::rtt::Rtt, Config, DEFAULT_CREDIT}; @@ -212,8 +212,8 @@ impl Drop for FlowController { #[cfg(test)] mod tests { use super::*; - use instant::Duration; use quickcheck::{GenRange, QuickCheck}; + use web_time::Duration; #[derive(Debug)] struct Input {