Fixed some warnings

This commit is contained in:
Dave
2025-11-25 13:58:27 +00:00
parent 2e4510679a
commit 3d746a8073
11 changed files with 78 additions and 48 deletions

View File

@@ -51,7 +51,7 @@ impl Simulator {
.iter()
.map(|node| {
let node_clone = Arc::clone(node);
let start_clone = start.clone();
let start_clone = start;
thread::spawn(move || {
while start_clone.elapsed() < duration {
node_clone.submit_price();
@@ -64,7 +64,7 @@ impl Simulator {
// Spawn network propagation thread
let nodes_clone = self.nodes.clone();
let partitioned_clone = Arc::clone(&self.partitioned);
let start_clone = start.clone();
let start_clone = start;
let propagation_handle = thread::spawn(move || {
while start_clone.elapsed() < duration {
let is_partitioned = *partitioned_clone.lock().unwrap();
@@ -80,7 +80,7 @@ impl Simulator {
let crdt1 = nodes_clone[i].crdt.lock().unwrap();
let mut crdt2 = nodes_clone[j].crdt.lock().unwrap();
crdt2.merge(&*crdt1);
crdt2.merge(&crdt1);
}
}
}