Skip to content

Commit a9e2828

Browse files
authored
Merge pull request #6360 from fdefelici/fix/clippy-issue
fix: more clippy::mismatched-lifetime-syntaxes due to rust update 1.89.0
2 parents 8caa5e4 + 0c5720d commit a9e2828

File tree

3 files changed

+22
-13
lines changed

3 files changed

+22
-13
lines changed

stackslib/src/chainstate/stacks/index/marf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,12 +1588,12 @@ impl<T: MarfTrieId> MARF<T> {
15881588

15891589
/// Access internal storage
15901590
#[cfg(test)]
1591-
pub fn borrow_storage_backend(&mut self) -> TrieStorageConnection<T> {
1591+
pub fn borrow_storage_backend(&mut self) -> TrieStorageConnection<'_, T> {
15921592
self.storage.connection()
15931593
}
15941594

15951595
#[cfg(test)]
1596-
pub fn borrow_storage_transaction(&mut self) -> TrieStorageTransaction<T> {
1596+
pub fn borrow_storage_transaction(&mut self) -> TrieStorageTransaction<'_, T> {
15971597
self.storage.transaction().unwrap()
15981598
}
15991599

stackslib/src/net/tests/convergence.rs

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,10 @@ fn test_walk_ring_15_org_biased() {
249249
})
250250
}
251251

252-
fn test_walk_ring_ex(peer_configs: &mut Vec<TestPeerConfig>, test_pingback: bool) -> Vec<TestPeer> {
252+
fn test_walk_ring_ex(
253+
peer_configs: &mut Vec<TestPeerConfig>,
254+
test_pingback: bool,
255+
) -> Vec<TestPeer<'_>> {
253256
// arrange neighbors into a "ring" topology, where
254257
// neighbor N is connected to neighbor (N-1)%NUM_NEIGHBORS and (N+1)%NUM_NEIGHBORS.
255258
// If test_pingback is true, then neighbor N is only connected to (N+1)%NUM_NEIGHBORS
@@ -303,11 +306,11 @@ fn test_walk_ring_ex(peer_configs: &mut Vec<TestPeerConfig>, test_pingback: bool
303306
peers
304307
}
305308

306-
fn test_walk_ring(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
309+
fn test_walk_ring(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
307310
test_walk_ring_ex(peer_configs, false)
308311
}
309312

310-
fn test_walk_ring_pingback(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
313+
fn test_walk_ring_pingback(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
311314
test_walk_ring_ex(peer_configs, true)
312315
}
313316

@@ -453,15 +456,18 @@ fn test_walk_line_15_pingback() {
453456
})
454457
}
455458

456-
fn test_walk_line(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
459+
fn test_walk_line(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
457460
test_walk_line_ex(peer_configs, false)
458461
}
459462

460-
fn test_walk_line_pingback(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
463+
fn test_walk_line_pingback(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
461464
test_walk_line_ex(peer_configs, true)
462465
}
463466

464-
fn test_walk_line_ex(peer_configs: &mut Vec<TestPeerConfig>, pingback_test: bool) -> Vec<TestPeer> {
467+
fn test_walk_line_ex(
468+
peer_configs: &mut Vec<TestPeerConfig>,
469+
pingback_test: bool,
470+
) -> Vec<TestPeer<'_>> {
465471
// arrange neighbors into a "line" topology.
466472
// If pingback_test is true, then the topology is unidirectional:
467473
//
@@ -659,15 +665,18 @@ fn test_walk_star_15_org_biased() {
659665
})
660666
}
661667

662-
fn test_walk_star(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
668+
fn test_walk_star(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
663669
test_walk_star_ex(peer_configs, false)
664670
}
665671

666-
fn test_walk_star_pingback(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
672+
fn test_walk_star_pingback(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
667673
test_walk_star_ex(peer_configs, true)
668674
}
669675

670-
fn test_walk_star_ex(peer_configs: &mut Vec<TestPeerConfig>, pingback_test: bool) -> Vec<TestPeer> {
676+
fn test_walk_star_ex(
677+
peer_configs: &mut Vec<TestPeerConfig>,
678+
pingback_test: bool,
679+
) -> Vec<TestPeer<'_>> {
671680
// arrange neighbors into a "star" topology.
672681
// If pingback_test is true, then initial connections are unidirectional -- each neighbor (except
673682
// for 0) only knows about 0. Neighbor 0 knows about no one.
@@ -718,7 +727,7 @@ fn test_walk_star_ex(peer_configs: &mut Vec<TestPeerConfig>, pingback_test: bool
718727
peers
719728
}
720729

721-
fn test_walk_inbound_line(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
730+
fn test_walk_inbound_line(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
722731
// arrange neighbors into a two-tiered "line" topology, where even-numbered neighbors are
723732
// "NAT'ed" but connected to both the predecessor and successor odd neighbors. Odd
724733
// numbered neighbors are not connected to anyone. The first and last even-numbered

stackslib/src/net/tests/download/epoch2x.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ pub fn run_get_blocks_and_microblocks<T, F, P, C, D>(
235235
mut peer_func: P,
236236
mut check_breakage: C,
237237
mut done_func: D,
238-
) -> Vec<TestPeer>
238+
) -> Vec<TestPeer<'_>>
239239
where
240240
T: FnOnce(&mut Vec<TestPeerConfig>),
241241
F: FnOnce(

0 commit comments

Comments
 (0)