mirror of https://github.com/zkat/miette.git
Remove literal case from ensure
This commit is contained in:
parent
cb5a1d35e0
commit
55f41a6bdb
|
|
@ -136,11 +136,6 @@ macro_rules! bail {
|
|||
/// ```
|
||||
#[macro_export]
|
||||
macro_rules! ensure {
|
||||
($cond:expr, $msg:literal $(,)?) => {
|
||||
if !$cond {
|
||||
return $crate::private::Err($crate::miette!($msg));
|
||||
}
|
||||
};
|
||||
($cond:expr, $err:expr $(,)?) => {
|
||||
if !$cond {
|
||||
return $crate::private::Err($crate::miette!($err));
|
||||
|
|
|
|||
Loading…
Reference in New Issue