Skip to content

Commit

Permalink
Put web-time dependency behind web-time feature
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaust committed Jan 10, 2025
1 parent d86a44d commit e812c01
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ v4 commits split out to branch `v4_maintenance` starting with `4.0.16`
## notify-types 2.0.0 (unreleased)

- CHANGE: replace instant crate with web-time [#652] **breaking**
- CHANGE: the web-time dependency is now behind the `web-time` feature **breaking**

[#652]: https://github.com/notify-rs/notify/pull/652

## debouncer-full 0.5.0 (unreleased)

- CHANGE: pass `web-time` feature to notify-types

## notify-types 1.0.1 (2024-12-17)

- FIX: `Event::kind` serialization with `serialization-compat-6` feature [#660]
Expand Down
1 change: 1 addition & 0 deletions notify-debouncer-full/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ repository.workspace = true
[features]
default = ["macos_fsevent"]
serde = ["notify-types/serde"]
web-time = ["notify-types/web-time"]
crossbeam-channel = ["dep:crossbeam-channel", "notify/crossbeam-channel"]
macos_fsevent = ["notify/macos_fsevent"]
macos_kqueue = ["notify/macos_kqueue"]
Expand Down
2 changes: 1 addition & 1 deletion notify-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ serialization-compat-6 = []

[dependencies]
serde = { workspace = true, optional = true }
web-time.workspace = true
web-time = { workspace = true, optional = true }

[dev-dependencies]
serde_json.workspace = true
Expand Down
4 changes: 4 additions & 0 deletions notify-types/src/debouncer_full.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
use std::ops::{Deref, DerefMut};

#[cfg(feature = "web-time")]
use web_time::Instant;

#[cfg(not(feature = "web-time"))]
use std::time::Instant;

use crate::event::Event;

/// A debounced event is emitted after a short delay.
Expand Down

0 comments on commit e812c01

Please sign in to comment.