Skip to content

Commit a0f6811

Browse files
authored
Replace unmaintained instant with web-time. (#391)
1 parent c64e53d commit a0f6811

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ cc = "1.0"
5656

5757
[dependencies]
5858
raw-window-handle = "0.6"
59+
web-time = "1.1"
5960

6061
[target.'cfg(windows)'.dependencies.winapi]
6162
version = "0.3.9"
@@ -93,7 +94,6 @@ lazy_static = { version = "1.0", optional = true }
9394
orbclient = "0.3.20"
9495

9596
[target.'cfg(target_arch = "wasm32")'.dependencies]
96-
instant = { version = "0.1.12", features = ["wasm-bindgen", "inaccurate"] }
9797
js-sys = "0.3.56"
9898
wasm-bindgen-futures = "0.4.29"
9999
serde = { version = "1.0.136", features = ["derive"] }

src/key_handler.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
#[cfg(target_arch = "wasm32")]
2-
extern crate instant;
3-
4-
#[cfg(target_arch = "wasm32")]
5-
use instant::{Duration, Instant};
6-
#[cfg(not(target_arch = "wasm32"))]
7-
use std::time::{Duration, Instant};
1+
use web_time::{Duration, Instant};
82

93
use crate::{InputCallback, Key, KeyRepeat};
104

src/rate.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
#[cfg(target_arch = "wasm32")]
2-
extern crate instant;
3-
#[cfg(target_arch = "wasm32")]
4-
use instant::{Duration, Instant};
5-
#[cfg(not(target_arch = "wasm32"))]
6-
use std::time::{Duration, Instant};
1+
use web_time::{Duration, Instant};
72

83
#[cfg_attr(target_arch = "wasm32", allow(unused))]
94
pub struct UpdateRate {

0 commit comments

Comments
 (0)