Skip to content
Myr

Merge pull request #120 from Aaron1011/fix/semi

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Don't emit trailing semicolon from `bail!`

authored by David Tolnay · committed by GitHub · parents c25be95, 3002c06 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:src/macros.rs+3 added-3 removed
51 unmodified lines
52/// ```53#[macro_export]54macro_rules! bail {55 ($msg:literal $(,)?) => {56 return $crate::private::Err($crate::anyhow!($msg));56 return $crate::private::Err($crate::anyhow!($msg))57 };58 ($err:expr $(,)?) => {59 return $crate::private::Err($crate::anyhow!($err));59 return $crate::private::Err($crate::anyhow!($err))60 };61 ($fmt:expr, $($arg:tt)*) => {62 return $crate::private::Err($crate::anyhow!($fmt, $($arg)*));62 return $crate::private::Err($crate::anyhow!($fmt, $($arg)*))63 };64}6566/// Return early with an error if a condition is not satisfied.
110 unmodified lines