mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 12:46:49 +00:00
1 parent
55b8908894
commit
828cb96ba9
4 files changed
+870
-826
No files matched your search
@@ -40,6 +40,16 @@ pub use self::{
|
||||
#[inline]
|
||||
pub fn exchange<T>(state: &mut T, source: T) -> T { std::mem::replace(state, source) }
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! extract_variant {
|
||||
($e:expr, $variant:path) => {
|
||||
match $e {
|
||||
$variant(value) => Some(value),
|
||||
_ => None,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! at {
|
||||
($idx:tt) => {
|
||||
|
||||
Reference in new issue
Block a user