Skip to content

Commit

Permalink
chore(deps): update to reference renamed sn_fake_clock crate
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Coyle committed Sep 1, 2020
1 parent 6195ada commit 4f10aa2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -11,7 +11,7 @@ version = "0.10.0"
edition = "2018"

[dependencies]
fake_clock = { version = "~0.3.0", optional = true }
sn_fake_clock = { version = "~0.4.0", optional = true }

[dev-dependencies]
rand = "~0.6.5"
2 changes: 1 addition & 1 deletion scripts/tests
Expand Up @@ -3,4 +3,4 @@
set -x -e

cargo test "$@" --release --verbose
cargo test "$@" --features fake_clock --release --verbose
cargo test "$@" --features sn_fake_clock --release --verbose
6 changes: 3 additions & 3 deletions src/iter.rs
Expand Up @@ -9,11 +9,11 @@

//! Misc LRU cache iterators.

#[cfg(feature = "fake_clock")]
use fake_clock::FakeClock as Instant;
#[cfg(feature = "sn_fake_clock")]
use sn_fake_clock::FakeClock as Instant;
use std::collections::{BTreeMap, VecDeque};
use std::time::Duration;
#[cfg(not(feature = "fake_clock"))]
#[cfg(not(feature = "sn_fake_clock"))]
use std::time::Instant;

/// An iterator over an `LruCache`'s entries that updates the timestamps as values are traversed.
Expand Down
12 changes: 6 additions & 6 deletions src/lib.rs
Expand Up @@ -82,12 +82,12 @@
variant_size_differences
)]

#[cfg(feature = "fake_clock")]
use fake_clock::FakeClock as Instant;
#[cfg(feature = "sn_fake_clock")]
use sn_fake_clock::FakeClock as Instant;
use std::borrow::Borrow;
use std::collections::{BTreeMap, VecDeque};
use std::time::Duration;
#[cfg(not(feature = "fake_clock"))]
#[cfg(not(feature = "sn_fake_clock"))]
use std::time::Instant;
use std::usize;

Expand Down Expand Up @@ -487,13 +487,13 @@ mod test {
use rand::thread_rng;
use std::time::Duration;

#[cfg(feature = "fake_clock")]
#[cfg(feature = "sn_fake_clock")]
fn sleep(time: u64) {
use fake_clock::FakeClock;
use sn_fake_clock::FakeClock;
FakeClock::advance_time(time);
}

#[cfg(not(feature = "fake_clock"))]
#[cfg(not(feature = "sn_fake_clock"))]
fn sleep(time: u64) {
use std::thread;
thread::sleep(Duration::from_millis(time));
Expand Down

0 comments on commit 4f10aa2

Please sign in to comment.