mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 15:38:48 +00:00
Prepare for Spring 2025.
This commit is contained in:
13
src/utils.rs
13
src/utils.rs
@@ -1,14 +1,3 @@
|
||||
#[macro_export]
|
||||
/// Some or executing the given expression.
|
||||
macro_rules! some_or {
|
||||
($e:expr_2021, $err:expr_2021) => {{
|
||||
match $e {
|
||||
Some(r) => r,
|
||||
None => $err,
|
||||
}
|
||||
}};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
/// Ok or exiting the process.
|
||||
macro_rules! ok_or_exit {
|
||||
@@ -24,7 +13,7 @@ macro_rules! ok_or_exit {
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
/// Ok or exiting the process.
|
||||
/// Some or exiting the process.
|
||||
macro_rules! some_or_exit {
|
||||
($e:expr_2021, $code:expr_2021) => {{
|
||||
match $e {
|
||||
|
||||
Reference in New Issue
Block a user