chiark / gitweb /
utils: Provide wantok macro
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Apr 2021 00:17:44 +0000 (01:17 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Apr 2021 00:47:26 +0000 (01:47 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/prelude.rs
src/utils.rs

index 5766b4531267dfc998b7825cb413f5b93859bbe7..accc5773d8fad1989906dd1506f96b329100dea4 100644 (file)
@@ -113,7 +113,7 @@ pub use crate::ensure_eq;
 pub use crate::from_instance_lock_error;
 pub use crate::matches_doesnot;
 pub use crate::trace_dbg;
-pub use crate::{want, wants, want_let, want_failed_internal};
+pub use crate::{want, wantok, wants, want_let, want_failed_internal};
 
 pub use crate::accounts::loaded_acl::{self, EffectiveACL, LoadedAcl, PermSet};
 pub use crate::accounts::*;
index 457572cdd3f9449ffe80bc99fd054bbfac3a9896..c72c5c55a91ccfa644b235abc60d2a21afb2aff2 100644 (file)
@@ -471,6 +471,10 @@ macro_rules! want {
 macro_rules! wants {
   { $($d:tt)* } => { want!(Some = $($d)*) }
 }
+#[macro_export]
+macro_rules! wantok {
+  { $($d:tt)* } => { want!(Ok = $($d)*) }
+}
 
 #[macro_export]
 macro_rules! want_let {