mirror of
https://github.com/TrueLayer/reqwest-middleware.git
synced 2024-12-26 19:06:31 +00:00
update wasm-timer to wasmtimer
This commit is contained in:
parent
8a494c1657
commit
4b3140e1e6
3 changed files with 6 additions and 5 deletions
|
@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
- Updated `wasm-timer` to `wasmtimer`
|
||||
|
||||
## [0.4.0] - 2024-11-08
|
||||
|
||||
### Breaking Changes
|
||||
|
|
|
@ -24,14 +24,14 @@ reqwest = { version = "0.12.0", default-features = false }
|
|||
retry-policies = "0.4"
|
||||
thiserror = "1.0.61"
|
||||
tracing = { version = "0.1.26", optional = true }
|
||||
wasmtimer = "0.4.1"
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
hyper = "1.0"
|
||||
tokio = { version = "1.6.0", default-features = false, features = ["time"] }
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
parking_lot = { version = "0.11.2", features = ["wasm-bindgen"] } # work around https://github.com/tomaka/wasm-timer/issues/14
|
||||
wasm-timer = "0.2.5"
|
||||
|
||||
getrandom = { version = "0.2.0", features = ["js"] }
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
@ -177,9 +177,7 @@ where
|
|||
#[cfg(not(target_arch = "wasm32"))]
|
||||
tokio::time::sleep(duration).await;
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
wasm_timer::Delay::new(duration)
|
||||
.await
|
||||
.expect("failed sleeping");
|
||||
wasmtimer::tokio::sleep(duration).await;
|
||||
|
||||
n_past_retries += 1;
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue