mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 21:26:50 +00:00
Introduce extract!(), rewrite part of uiaa username handling
This commit is contained in:
1 parent
c0aaeefaf2
commit
62ec58b1ed
2 files changed
+15
-11
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user