Skip to content

Commit

Permalink
Fix panic fmt warning
Browse files Browse the repository at this point in the history
  • Loading branch information
DoumanAsh committed Apr 29, 2021
1 parent b64ccb7 commit 5973dd2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ include = [
[features]
default = []
# Enables std usage
std = []
std = ["error-code/std"]
# Enables C API wrapper for platform code.
c_wrapper = ["cc"]
# Enables usage of tokio 1.0
Expand All @@ -28,7 +28,7 @@ tokio1 = ["tokio_1", "nix", "std"]
stream = ["futures-core"]

[dependencies]
error-code = "2"
error-code = "2.2"

[dependencies.futures-core]
version = "0.3"
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

Timer facilities for Rust's async story

Minimal Rust version: 1.36

## Accuracy

Regular timers that do not rely on async event loop tend to be on par with user space timers
Expand Down
5 changes: 1 addition & 4 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,10 @@ macro_rules! os_assert {
})
}

#[allow(unused)]
pub(crate) const ZERO_TIME_FAIL: &str = "Zero timeout makes no sense";

#[allow(unused_macros)]
#[doc(hidden)]
macro_rules! assert_time {
($time:expr) => ({
debug_assert!(!($time.as_secs() == 0 && $time.subsec_nanos() == 0), $crate::utils::ZERO_TIME_FAIL);
debug_assert!(!($time.as_secs() == 0 && $time.subsec_nanos() == 0), "Zero timeout makes no sense");
})
}

0 comments on commit 5973dd2

Please sign in to comment.