Skip to content

Commit caac615

Browse files
committed
fix warning in block! when the error type is !
closes #5
1 parent 4696bd0 commit caac615

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,12 @@ macro_rules! await {
327327
macro_rules! block {
328328
($e:expr) => {
329329
loop {
330+
#[allow(unreachable_patterns)]
330331
match $e {
331-
Err($crate::Error::Other(e)) => break Err(e),
332+
Err($crate::Error::Other(e)) => {
333+
#[allow(unreachable_code)]
334+
break Err(e)
335+
},
332336
Err($crate::Error::WouldBlock) => {},
333337
Ok(x) => break Ok(x),
334338
}

0 commit comments

Comments
 (0)