backup commit
This commit is contained in:
6
src/utils/unwrap_or.rs
Normal file
6
src/utils/unwrap_or.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
#[macro_export]
|
||||
macro_rules! unwrap_or {
|
||||
($m:expr; $fail:expr) => {
|
||||
{ if let Some(res) = ($m) {res} else {$fail} }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user