mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-09-28 05:21:34 +00:00
Remove unneeded parens in ensure macro
This commit is contained in:
parent
dd1876cb32
commit
c5e1ca0e04
@ -352,12 +352,12 @@ macro_rules! bail {
|
||||
#[macro_export]
|
||||
macro_rules! ensure {
|
||||
($cond:expr, $err:expr $(,)?) => {
|
||||
if !($cond) {
|
||||
if !$cond {
|
||||
return std::result::Result::Err($crate::anyhow!($err));
|
||||
}
|
||||
};
|
||||
($cond:expr, $fmt:expr, $($arg:tt)*) => {
|
||||
if !($cond) {
|
||||
if !$cond {
|
||||
return std::result::Result::Err($crate::anyhow!($fmt, $($arg)*));
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user