Skip to content

Commit

Permalink
Run rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Detegr committed Aug 14, 2022
1 parent 08abf10 commit 6e4ae32
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ pub fn set_handler<F>(mut user_handler: F) -> Result<(), Error>
where
F: FnMut() -> () + 'static + Send,
{
if INIT.compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst).map_or_else(|e| e, |a| a) {
if INIT
.compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst)
.map_or_else(|e| e, |a| a)
{
return Err(Error::MultipleHandlers);
}

Expand Down

0 comments on commit 6e4ae32

Please sign in to comment.