Closed
Description
The code:
use std::sync::Mutex;
#[derive(Clone, Debug)]
struct A {}
fn main() {
let n = Mutex::new(Some(A {}));
if let Some(a) = { let a = n.lock().unwrap(); a.clone() } {
n.lock();
}
println!("This is ok");
if let Some(a) = { let a = n.lock(); a.unwrap().clone() } {
n.lock();
}
println!("Never reached !!!!");
}
Output:
Finished dev [unoptimized + debuginfo] target(s) in 0.56s
Running `target/debug/playground`
/root/entrypoint.sh: line 8: 7 Killed timeout --signal=KILL ${timeout} "$@"
Standard Output
This is ok
Metadata
Metadata
Assignees
Labels
No labels