diff options
author | trinity-1686a <trinity@deuxfleurs.fr> | 2023-08-25 10:30:03 +0200 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2023-08-25 12:53:17 -0400 |
commit | 73930bda48b02e65c7e7405f248a6b2318e05ab9 (patch) | |
tree | 7f57dbab6247da9e129a42c80a43a83e888bdba3 /src | |
parent | 97d3cf395066977a5c89fe13093f334ab8b3a0e0 (diff) | |
download | tor-73930bda48b02e65c7e7405f248a6b2318e05ab9.tar.gz tor-73930bda48b02e65c7e7405f248a6b2318e05ab9.zip |
fix lint clippy::arc_with_non_send_sync
Diffstat (limited to 'src')
-rw-r--r-- | src/ext/equix/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ext/equix/src/lib.rs b/src/ext/equix/src/lib.rs index 67232d239c..b5281ff149 100644 --- a/src/ext/equix/src/lib.rs +++ b/src/ext/equix/src/lib.rs @@ -217,7 +217,7 @@ mod tests { use crate::*; use hex_literal::hex; use std::cell::RefCell; - use std::sync::Arc; + use std::rc::Rc; #[test] fn equix_context() { @@ -334,7 +334,7 @@ mod tests { // Use a Rng callback to read the sequence of pseudorandom numbers // without changing them, and spot check the list we get back. let mut ctx = HashX::new(HashXType::HASHX_TRY_COMPILE); - let seq = Arc::new(RefCell::new(Vec::new())); + let seq = Rc::new(RefCell::new(Vec::new())); { let seq = seq.clone(); ctx.rng_callback(Some(Box::new(move |value| { @@ -363,7 +363,7 @@ mod tests { // We have to choose the replacement somewhat carefully since // many stationary replacement values will cause infinite loops. let mut ctx = HashX::new(HashXType::HASHX_TYPE_INTERPRETED); - let counter = Arc::new(RefCell::new(0u32)); + let counter = Rc::new(RefCell::new(0u32)); { let counter = counter.clone(); ctx.rng_callback(Some(Box::new(move |_value| { @@ -970,7 +970,7 @@ mod tests { let mut ctx = HashX::new(hash_type); // Fully replace the Rng stream, which must be exactly the right size - let counter = Arc::new(RefCell::new(0_usize)); + let counter = Rc::new(RefCell::new(0_usize)); { let counter = counter.clone(); ctx.rng_callback(Some(Box::new(move |_value| { |