Skip to content

Commit

Permalink
warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
density215 committed Oct 18, 2024
1 parent 9f8dea9 commit 7c82159
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/local_array/atomic_stride.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ impl AtomicBitmap for AtomicStride6 {
unimplemented!()
}

fn merge_with(&self, node: Self::InnerType) {
fn merge_with(&self, _node: Self::InnerType) {
todo!()
}
}
Expand Down
1 change: 0 additions & 1 deletion src/local_array/node.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::marker::PhantomPinned;
use std::sync::atomic::{AtomicU16, AtomicU32, AtomicU64, AtomicU8};
use std::{
fmt::Debug,
Expand Down
7 changes: 3 additions & 4 deletions src/local_array/store/atomic_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::collections::HashMap;
use std::sync::{Arc, Mutex, MutexGuard, RwLock};
use std::{
fmt::{Debug, Display},
mem::MaybeUninit,
sync::atomic::Ordering,
};

Expand Down Expand Up @@ -67,7 +66,7 @@ impl<AF: AddressFamily, S: Stride> NodeSet<AF, S> {
pub fn update_rbm_index(
&self,
multi_uniq_id: u32,
guard: &crate::epoch::Guard,
_guard: &crate::epoch::Guard,
) -> Result<u32, crate::prelude::multi::PrefixStoreError>
where
S: crate::local_array::atomic_stride::Stride,
Expand Down Expand Up @@ -114,7 +113,7 @@ impl<AF: AddressFamily, S: Stride> NodeSet<AF, S> {
pub fn remove_from_rbm_index(
&self,
multi_uniq_id: u32,
guard: &crate::epoch::Guard,
_guard: &crate::epoch::Guard,
) -> Result<u32, crate::prelude::multi::PrefixStoreError>
where
S: crate::local_array::atomic_stride::Stride,
Expand Down Expand Up @@ -825,7 +824,7 @@ impl<AF: AddressFamily, M: Meta> PrefixSet<AF, M> {
pub(crate) fn get_by_index<'a>(
&'a self,
index: usize,
guard: &'a Guard,
_guard: &'a Guard,
) -> Option<&'a StoredPrefix<AF, M>> {
self.0[index].get()
}
Expand Down
6 changes: 2 additions & 4 deletions src/local_array/store/custom_alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ use log::{debug, info, log_enabled, trace};

use crossbeam_epoch::{self as epoch, Atomic};
use crossbeam_utils::Backoff;
use epoch::{CompareExchangeError, Guard, Owned, Shared};
use epoch::{Guard, Owned};
use roaring::RoaringBitmap;

use std::marker::PhantomData;
Expand Down Expand Up @@ -399,8 +399,6 @@ impl<
>,
}

let back_off = crossbeam_utils::Backoff::new();

let search_level_3 =
store_node_closure![Stride3; id; guard; back_off;];
let search_level_4 =
Expand Down Expand Up @@ -451,7 +449,7 @@ impl<
pub(crate) fn retrieve_node_with_guard(
&'a self,
id: StrideNodeId<AF>,
guard: &'a Guard,
_guard: &'a Guard,
) -> Option<SizedStrideRef<'a, AF>> {
struct SearchLevel<'s, AF: AddressFamily, S: Stride> {
f: &'s dyn for<'a> Fn(
Expand Down
2 changes: 1 addition & 1 deletion src/local_array/store/iterators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use crate::{

use crossbeam_epoch::Guard;
use inetnum::addr::Prefix;
use log::{debug, log_enabled, trace};
use log::trace;
use roaring::RoaringBitmap;

// ----------- PrefixIter ---------------------------------------------------
Expand Down
7 changes: 0 additions & 7 deletions src/local_array/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@ pub enum SizedStrideRef<'a, AF: AddressFamily> {
Stride5(&'a TreeBitMapNode<AF, Stride5>),
}

#[derive(Debug)]
pub enum SizedStrideRefMut<'a, AF: AddressFamily> {
Stride3(&'a mut TreeBitMapNode<AF, Stride3>),
Stride4(&'a mut TreeBitMapNode<AF, Stride4>),
Stride5(&'a mut TreeBitMapNode<AF, Stride5>),
}

pub(crate) enum NewNodeOrIndex<AF: AddressFamily> {
NewNode(SizedStrideNode<AF>),
ExistingNode(StrideNodeId<AF>),
Expand Down

0 comments on commit 7c82159

Please sign in to comment.