diff options
Diffstat (limited to 'crates/tor-dirmgr')
| -rw-r--r-- | crates/tor-dirmgr/src/bridgedesc/bdtest.rs | 8 | ||||
| -rw-r--r-- | crates/tor-dirmgr/src/lib.rs | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/crates/tor-dirmgr/src/bridgedesc/bdtest.rs b/crates/tor-dirmgr/src/bridgedesc/bdtest.rs index d7b917303..b1f58bd3b 100644 --- a/crates/tor-dirmgr/src/bridgedesc/bdtest.rs +++ b/crates/tor-dirmgr/src/bridgedesc/bdtest.rs @@ -217,7 +217,7 @@ where .and_then(|()| bdm.mgr.lock_only().running.is_empty().then_some(())) }) .await; - bdm.set_bridges(&[bridge.clone()]); + bdm.set_bridges(std::slice::from_ref(bridge)); } fn bad_bridge(i: usize) -> BridgeKey { @@ -242,7 +242,7 @@ fn success() -> Result<(), anyhow::Error> { let hold = mock.mstate.lock().await; - bdm.set_bridges(&[bridge.clone()]); + bdm.set_bridges(std::slice::from_ref(&bridge)); bdm.check_consistency(Some([&bridge])); drop(hold); @@ -398,7 +398,7 @@ fn cache() -> Result<(), anyhow::Error> { eprintln!("----- test that a downloaded descriptor goes into the cache -----"); - bdm.set_bridges(&[bridge.clone()]); + bdm.set_bridges(std::slice::from_ref(&bridge)); stream_drain_until(3, &mut events, || async { in_results(Some(Ok(()))) }).await; mock.expect_download_calls(1).await; @@ -481,7 +481,7 @@ fn dormant() -> Result<(), anyhow::Error> { eprintln!("----- become dormant, but request a bridge -----"); bdm.set_dormancy(Dormant); - bdm.set_bridges(&[bridge.clone()]); + bdm.set_bridges(std::slice::from_ref(&bridge)); // Drive all tasks until we are idle runtime.progress_until_stalled().await; diff --git a/crates/tor-dirmgr/src/lib.rs b/crates/tor-dirmgr/src/lib.rs index 80bfb6755..4d322f36d 100644 --- a/crates/tor-dirmgr/src/lib.rs +++ b/crates/tor-dirmgr/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 @@ --> // This clippy lint produces a false positive on `use strum`, below. |
