Skip to content

Commit

Permalink
remove unused mutex (lambdaclass#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
greged93 authored and Gerson2102 committed May 26, 2024
1 parent 26899d6 commit e48a304
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/bin/cairo-native-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use starknet_types_core::felt::Felt;
use std::{
iter::once,
path::{Path, PathBuf},
sync::Mutex,
vec::IntoIter,
};
use tracing_subscriber::{EnvFilter, FmtSubscriber};
Expand Down Expand Up @@ -428,12 +427,12 @@ fn run_tests(
.unwrap();

println!("running {} tests", named_tests.len());
let wrapped_summary = Mutex::new(Ok(TestsSummary {
let mut wrapped_summary = Ok(TestsSummary {
passed: vec![],
failed: vec![],
ignored: vec![],
failed_run_results: vec![],
}));
});
named_tests
.into_iter()
.map(
Expand Down Expand Up @@ -493,14 +492,10 @@ fn run_tests(
},
)
.for_each(|r| {
let mut wrapped_summary = wrapped_summary.lock().unwrap();
if wrapped_summary.is_err() {
return;
}
let (name, status) = match r {
Ok((name, status)) => (name, status),
Err(err) => {
*wrapped_summary = Err(err);
wrapped_summary = Err(err);
return;
}
};
Expand All @@ -526,7 +521,7 @@ fn run_tests(
}
res_type.push(name);
});
wrapped_summary.into_inner().unwrap()
wrapped_summary
}

pub struct TestSyscallHandler;
Expand Down

0 comments on commit e48a304

Please sign in to comment.