Skip to content

Commit

Permalink
refactor: replace instant with web-time (apache#13355)
Browse files Browse the repository at this point in the history
  • Loading branch information
crepererum authored and alamb committed Nov 13, 2024
1 parent 073d8e8 commit da7c0b5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
24 changes: 11 additions & 13 deletions datafusion-cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion datafusion/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ sqlparser = { workspace = true }
tokio = { workspace = true }

[target.'cfg(target_family = "wasm")'.dependencies]
instant = { version = "0.1", features = ["wasm-bindgen"] }
web-time = "1.1.0"

[dev-dependencies]
rand = { workspace = true }
4 changes: 2 additions & 2 deletions datafusion/common/src/instant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
//! WASM-compatible `Instant` wrapper.

#[cfg(target_family = "wasm")]
/// DataFusion wrapper around [`std::time::Instant`]. Uses [`instant::Instant`]
/// DataFusion wrapper around [`std::time::Instant`]. Uses [`web_time::Instant`]
/// under `wasm` feature gate. It provides the same API as [`std::time::Instant`].
pub type Instant = instant::Instant;
pub type Instant = web_time::Instant;

#[allow(clippy::disallowed_types)]
#[cfg(not(target_family = "wasm"))]
Expand Down

0 comments on commit da7c0b5

Please sign in to comment.