Skip to content

Commit

Permalink
style: satisfy clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
loyd authored and hawkw committed Mar 31, 2024
1 parent d58116b commit ee45b4c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ fn insert_remove_local(c: &mut Criterion) {
g.bench_with_input(BenchmarkId::new("slab_biglock", i), i, |b, &i| {
b.iter_custom(|iters| {
let mut total = Duration::from_secs(0);
let i = i;
for _ in 0..iters {
let bench = MultithreadedBench::new(Arc::new(RwLock::new(slab::Slab::new())));
let elapsed = bench
Expand Down
2 changes: 1 addition & 1 deletion src/page/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ impl<C: cfg::Config> Eq for Addr<C> {}

impl<C: cfg::Config> PartialOrd for Addr<C> {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
self.addr.partial_cmp(&other.addr)
Some(self.cmp(other))
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/page/slot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ impl<C: cfg::Config> Eq for Generation<C> {}

impl<C: cfg::Config> PartialOrd for Generation<C> {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
self.value.partial_cmp(&other.value)
Some(self.cmp(other))
}
}

Expand Down Expand Up @@ -736,7 +736,7 @@ impl<C: cfg::Config> Eq for RefCount<C> {}

impl<C: cfg::Config> PartialOrd for RefCount<C> {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
self.value.partial_cmp(&other.value)
Some(self.cmp(other))
}
}

Expand Down

0 comments on commit ee45b4c

Please sign in to comment.