lang: remove io_assert

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-02-21 13:41:59 +01:00
parent d4b4115400
commit fc4e02a34f

View File

@ -36,18 +36,3 @@ macro_rules! io_bail {
return Err($crate::io_format_err!($($msg)+));
}};
}
#[doc(hidden)]
/// Non-panicking assertion: shortcut for returning an `io::Error` if the condition is not met.
/// Essentially: `if !expr { io_bail_last!() }`.
///
/// Note that this uses `errno`, care must be taken not to overwrite it with different value as a
/// side effect.
#[macro_export]
macro_rules! io_assert {
($value:expr) => {
if !$value {
$crate::io_bail_last!();
}
};
}