Skip to content

Commit

Permalink
Apply cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuya6502 committed Sep 14, 2024
1 parent a651cc6 commit e337163
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/common/concurrent.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::common::{deque::DeqNode, time::Instant};

use moka_arc::MiniArc;
use parking_lot::Mutex;
use std::{fmt, ptr::NonNull, sync::Arc};
use tagptr::TagNonNull;
use moka_arc::MiniArc;

pub(crate) mod constants;
pub(crate) mod deques;
Expand Down
2 changes: 1 addition & 1 deletion src/common/concurrent/deques.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use crate::common::{
CacheRegion,
};

use moka_arc::MiniArc;
use std::ptr::NonNull;
use tagptr::TagNonNull;
use moka_arc::MiniArc;

pub(crate) struct Deques<K> {
pub(crate) window: Deque<KeyHashDate<K>>, // Not used yet.
Expand Down
2 changes: 1 addition & 1 deletion src/common/timer_wheel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use super::{
time::{CheckedTimeOps, Instant},
};

use parking_lot::Mutex;
use moka_arc::MiniArc;
use parking_lot::Mutex;

const BUCKET_COUNTS: &[u64] = &[
64, // roughly seconds
Expand Down
2 changes: 1 addition & 1 deletion src/future/base_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ use async_lock::{Mutex, MutexGuard, RwLock};
use crossbeam_channel::{Receiver, Sender, TrySendError};
use crossbeam_utils::atomic::AtomicCell;
use futures_util::future::BoxFuture;
use moka_arc::MiniArc;
use parking_lot::RwLock as SyncRwLock;
use smallvec::SmallVec;
use std::{
Expand All @@ -51,7 +52,6 @@ use std::{
},
time::{Duration, Instant as StdInstant},
};
use moka_arc::MiniArc;

pub(crate) type HouseKeeperArc = Arc<Housekeeper>;

Expand Down
2 changes: 1 addition & 1 deletion src/future/invalidator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ use crate::{
};

use async_lock::{Mutex, MutexGuard};
use moka_arc::MiniArc;
use std::{
hash::{BuildHasher, Hash},
sync::{
atomic::{AtomicBool, Ordering},
Arc,
},
};
use moka_arc::MiniArc;
use uuid::Uuid;

pub(crate) type PredicateFun<K, V> = Arc<dyn Fn(&K, &V) -> bool + Send + Sync + 'static>;
Expand Down
2 changes: 1 addition & 1 deletion src/future/value_initializer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use async_lock::{RwLock, RwLockWriteGuard};
use futures_util::FutureExt;
use moka_arc::MiniArc;
use std::{
any::{Any, TypeId},
fmt,
Expand All @@ -8,7 +9,6 @@ use std::{
pin::Pin,
sync::Arc,
};
use moka_arc::MiniArc;

use crate::{
ops::compute::{CompResult, Op},
Expand Down
2 changes: 1 addition & 1 deletion src/sync/value_initializer.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use moka_arc::MiniArc;
use parking_lot::RwLock;
use std::{
any::{Any, TypeId},
fmt,
hash::{BuildHasher, Hash},
sync::Arc,
};
use moka_arc::MiniArc;

use crate::{
ops::compute::{CompResult, Op},
Expand Down
2 changes: 1 addition & 1 deletion src/sync_base/base_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ use crate::{

use crossbeam_channel::{Receiver, Sender, TrySendError};
use crossbeam_utils::atomic::AtomicCell;
use moka_arc::MiniArc;
use parking_lot::{Mutex, RwLock};
use smallvec::SmallVec;
use std::{
Expand All @@ -45,7 +46,6 @@ use std::{
},
time::{Duration, Instant as StdInstant},
};
use moka_arc::MiniArc;

pub(crate) type HouseKeeperArc = Arc<Housekeeper>;

Expand Down
2 changes: 1 addition & 1 deletion src/sync_base/invalidator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::{
PredicateError,
};

use moka_arc::MiniArc;
use parking_lot::{Mutex, MutexGuard};
use std::{
hash::{BuildHasher, Hash},
Expand All @@ -16,7 +17,6 @@ use std::{
Arc,
},
};
use moka_arc::MiniArc;
use uuid::Uuid;

pub(crate) type PredicateFun<K, V> = Arc<dyn Fn(&K, &V) -> bool + Send + Sync + 'static>;
Expand Down
2 changes: 1 addition & 1 deletion src/sync_base/key_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use std::{

use crate::cht::SegmentedHashMap;

use parking_lot::{Mutex, MutexGuard};
use moka_arc::MiniArc;
use parking_lot::{Mutex, MutexGuard};

const LOCK_MAP_NUM_SEGMENTS: usize = 64;

Expand Down

0 comments on commit e337163

Please sign in to comment.