Skip to content

Commit 089d871

Browse files
committed
chore: suppress new clippy lints
1 parent dbef3d6 commit 089d871

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ manual_assert = { level = "allow", priority = 1 }
4444
manual_let_else = { level = "allow", priority = 1 }
4545
manual_string_new = { level = "allow", priority = 1 }
4646
many_single_char_names = { level = "allow", priority = 1 }
47-
match_on_vec_items = { level = "allow", priority = 1 }
4847
match_wildcard_for_single_variants = { level = "allow", priority = 1 }
4948
missing_errors_doc = { level = "allow", priority = 1 }
5049
missing_fields_in_debug = { level = "allow", priority = 1 }
@@ -69,6 +68,7 @@ used_underscore_binding = { level = "allow", priority = 1 }
6968
ref_option = { level = "allow", priority = 1 }
7069
unnecessary_semicolon = { level = "allow", priority = 1 }
7170
ignore_without_reason = { level = "allow", priority = 1 }
71+
needless_for_each = { level = "allow", priority = 1 }
7272
# restriction-lints:
7373
absolute_paths = { level = "allow", priority = 1 }
7474
arithmetic_side_effects = { level = "allow", priority = 1 }
@@ -169,3 +169,5 @@ doc_overindented_list_items = { level = "allow", priority = 1 }
169169
# complexity-lints
170170
precedence = { level = "allow", priority = 1 }
171171
manual_div_ceil = { level = "allow", priority = 1 }
172+
# perf-lints
173+
cloned_ref_to_slice_refs = { level = "allow", priority = 1 }

src/data_structures/avl_tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl<T: Ord> AVLTree<T> {
8585
}
8686

8787
/// Returns an iterator that visits the nodes in the tree in order.
88-
fn node_iter(&self) -> NodeIter<T> {
88+
fn node_iter(&self) -> NodeIter<'_, T> {
8989
let cap = self.root.as_ref().map_or(0, |n| n.height);
9090
let mut node_iter = NodeIter {
9191
stack: Vec::with_capacity(cap),

src/data_structures/probabilistic/bloom_filter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pub trait BloomFilter<Item: Hash> {
2121
/// When looking for an item, we hash its value and retrieve the boolean at index `hash(item) % CAPACITY`
2222
/// If it's `false` it's absolutely sure the item isn't present
2323
/// If it's `true` the item may be present, or maybe another one produces the same hash
24+
#[allow(dead_code)]
2425
#[derive(Debug)]
2526
struct BasicBloomFilter<const CAPACITY: usize> {
2627
vec: [bool; CAPACITY],

src/general/genetic.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pub trait SelectionStrategy<Rng: rand::Rng> {
3636

3737
/// A roulette wheel selection strategy
3838
/// https://en.wikipedia.org/wiki/Fitness_proportionate_selection
39+
#[allow(dead_code)]
3940
pub struct RouletteWheel<Rng: rand::Rng> {
4041
rng: Rng,
4142
}
@@ -84,6 +85,7 @@ impl<Rng: rand::Rng> SelectionStrategy<Rng> for RouletteWheel<Rng> {
8485
}
8586
}
8687

88+
#[allow(dead_code)]
8789
pub struct Tournament<const K: usize, Rng: rand::Rng> {
8890
rng: Rng,
8991
}

0 commit comments

Comments
 (0)