Introduce extract!(), rewrite part of uiaa username handling

This commit is contained in:
dasha_uwu authored and Jason Volk committed 2026-01-17 06:44:34 +00:00
1 parent c0aaeefaf2
commit 62ec58b1ed
2 files changed
+15 -11

No files matched your search

+10
View File
@@ -61,6 +61,16 @@ macro_rules! extract_variant {
};
}
#[macro_export]
macro_rules! extract {
($e:expr_2021, $out:ident in $variant:pat) => {
match $e {
| $variant => Some($out),
| _ => None,
}
};
}
/// Functor for !is_empty()
#[macro_export]
macro_rules! is_not_empty {