Skip to content

Commit 7fc2766

Browse files
authored
Merge branch 'master' into improve-trie
2 parents 0adcf46 + 4eec0b7 commit 7fc2766

File tree

12 files changed

+19
-14
lines changed

12 files changed

+19
-14
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ jobs:
1414
name: cargo fmt
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v5
1818
- name: cargo fmt
1919
run: cargo fmt --all -- --check
2020

2121
clippy:
2222
name: cargo clippy
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v5
2626
- name: cargo clippy
2727
run: cargo clippy --all --all-targets -- -D warnings
2828

2929
test:
3030
name: cargo test
3131
runs-on: ubuntu-latest
3232
steps:
33-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@v5
3434
- name: cargo test
3535
run: cargo test

.github/workflows/code_ql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout repository
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v5
2525

2626
- name: Initialize CodeQL
2727
uses: github/codeql-action/init@v3

.github/workflows/directory_workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: DIRECTORY.md
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515
with:
1616
fetch-depth: 0
1717
- uses: actions/setup-python@v5

.github/workflows/upload_coverage_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
env:
2222
CARGO_TERM_COLOR: always
2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v5
2525
- uses: taiki-e/install-action@cargo-llvm-cov
2626
- name: Generate code coverage
2727
run: >

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: 2 additions & 2 deletions
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),
@@ -100,7 +100,7 @@ impl<T: Ord> AVLTree<T> {
100100
}
101101

102102
/// Returns an iterator that visits the values in the tree in ascending order.
103-
pub fn iter(&self) -> Iter<T> {
103+
pub fn iter(&self) -> Iter<'_, T> {
104104
Iter {
105105
node_iter: self.node_iter(),
106106
}

src/data_structures/binary_search_tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl<T> BinarySearchTreeIter<'_, T>
188188
where
189189
T: Ord,
190190
{
191-
pub fn new(tree: &BinarySearchTree<T>) -> BinarySearchTreeIter<T> {
191+
pub fn new(tree: &BinarySearchTree<T>) -> BinarySearchTreeIter<'_, T> {
192192
let mut iter = BinarySearchTreeIter { stack: vec![tree] };
193193
iter.stack_push_left();
194194
iter

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/data_structures/treap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl<T: Ord> Treap<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 mut node_iter = NodeIter { stack: Vec::new() };
9090
// Initialize stack with path to leftmost child
9191
let mut child = &self.root;
@@ -97,7 +97,7 @@ impl<T: Ord> Treap<T> {
9797
}
9898

9999
/// Returns an iterator that visits the values in the tree in ascending order.
100-
pub fn iter(&self) -> Iter<T> {
100+
pub fn iter(&self) -> Iter<'_, T> {
101101
Iter {
102102
node_iter: self.node_iter(),
103103
}

src/data_structures/veb_tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl VebTree {
5858
self.max
5959
}
6060

61-
pub fn iter(&self) -> VebTreeIter {
61+
pub fn iter(&self) -> VebTreeIter<'_> {
6262
VebTreeIter::new(self)
6363
}
6464

0 commit comments

Comments
 (0)