unsafe unwrap in r
@@ -1520,7 +1520,7 @@ mod chan1 {
loop {
select! {
recv(c.rx()) -> rr => {
- if let Ok(r) = rr {
+ let r = rr.unwrap();
let mut data = h.lock().unwrap();
if data[r] != 1 {
println!("r\nm={}\nr={}\nh={}\n", m, r, data[r]);
@@ -1531,7 +1531,6 @@ mod chan1 {
}
}
}
- }
fn s(c: Chan<usize>, h: Arc<Mutex<[usize; N]>>) {
for n in 0..N {
