summaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tor-guardmgr')
-rw-r--r--crates/tor-guardmgr/src/lib.rs1
-rw-r--r--crates/tor-guardmgr/src/sample.rs4
2 files changed, 3 insertions, 2 deletions
diff --git a/crates/tor-guardmgr/src/lib.rs b/crates/tor-guardmgr/src/lib.rs
index 4f0d395d4..a981f356f 100644
--- a/crates/tor-guardmgr/src/lib.rs
+++ b/crates/tor-guardmgr/src/lib.rs
@@ -41,6 +41,7 @@
#![allow(clippy::result_large_err)] // temporary workaround for arti#587
#![allow(clippy::needless_raw_string_hashes)] // complained-about code is fine, often best
#![allow(clippy::needless_lifetimes)] // See arti#1765
+#![allow(mismatched_lifetime_syntaxes)] // temporary workaround for arti#2060
//! <!-- @@ end lint list maintained by maint/add_warning @@ -->
// TODO #1645 (either remove this, or decide to have it everywhere)
diff --git a/crates/tor-guardmgr/src/sample.rs b/crates/tor-guardmgr/src/sample.rs
index fbf73e93f..572a541fa 100644
--- a/crates/tor-guardmgr/src/sample.rs
+++ b/crates/tor-guardmgr/src/sample.rs
@@ -1140,7 +1140,7 @@ mod test {
// Pick a guard and mark it as confirmed.
let id1 = guards.sample[0].clone();
guards.record_success(&id1, &params, None, t2);
- assert_eq!(&guards.confirmed, &[id1.clone()]);
+ assert_eq!(&guards.confirmed, std::slice::from_ref(&id1));
// Encode the guards, then decode them.
let state: GuardSample = (&guards).into();
@@ -1185,7 +1185,7 @@ mod test {
// Pick a guard and mark it as confirmed.
let id3 = guards.sample[3].clone();
guards.record_success(&id3, &params, None, t2);
- assert_eq!(&guards.confirmed, &[id3.clone()]);
+ assert_eq!(&guards.confirmed, std::slice::from_ref(&id3));
let id1 = guards.sample[1].clone();
guards.record_success(&id1, &params, None, t3);
assert_eq!(&guards.confirmed, &[id3.clone(), id1.clone()]);