From fc4e02a34f62a907b3f94fbf160ff960fd59cc9a Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Mon, 21 Feb 2022 13:41:59 +0100 Subject: [PATCH] lang: remove io_assert Signed-off-by: Wolfgang Bumiller --- proxmox-lang/src/error.rs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/proxmox-lang/src/error.rs b/proxmox-lang/src/error.rs index 2e03c5b0..67d00290 100644 --- a/proxmox-lang/src/error.rs +++ b/proxmox-lang/src/error.rs @@ -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!(); - } - }; -}