diff --git a/src/race.rs b/src/race.rs index ee3d51a..fe36fa1 100644 --- a/src/race.rs +++ b/src/race.rs @@ -351,7 +351,7 @@ mod once_box { Ordering::AcqRel, Ordering::Acquire, ); - if let Err(_) = exchange { + if exchange.is_err() { let value = unsafe { Box::from_raw(ptr) }; return Err(value); }