Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
eldruin committed Jul 7, 2020
1 parent 03c87e1 commit 2536484
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,21 +386,20 @@ macro_rules! await {
loop {
#[allow(unreachable_patterns)]
match $e {
Err($crate::Error::Other(e)) => {
Err($crate::Error::Other(e)) =>
{
#[allow(unreachable_code)]
break Err(e)
},
Err($crate::Error::WouldBlock) => {}, // yield (see below)
}
Err($crate::Error::WouldBlock) => {} // yield (see below)
Ok(x) => break Ok(x),
}

yield
}
}
};
}



/// Future adapter
///
/// This is a *try* operation from a `nb::Result` to a `futures::Poll`
Expand Down Expand Up @@ -432,10 +431,8 @@ macro_rules! try_nb {
($e:expr) => {
match $e {
Err($crate::Error::Other(e)) => return Err(e),
Err($crate::Error::WouldBlock) => {
return Ok(::futures::Async::NotReady)
},
Err($crate::Error::WouldBlock) => return Ok(::futures::Async::NotReady),
Ok(x) => x,
}
}
};
}

0 comments on commit 2536484

Please sign in to comment.