]> git.proxmox.com Git - proxmox.git/commitdiff
lang: remove io_assert
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 21 Feb 2022 12:41:59 +0000 (13:41 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 21 Feb 2022 12:41:59 +0000 (13:41 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
proxmox-lang/src/error.rs

index 2e03c5b0991e1cb78989e644ff1fddfeb47561fd..67d00290d53541e02f63e286506dc319fb088158 100644 (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!();
-        }
-    };
-}