8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unwrap_or_else!
go_match!
1 parent 809eec7 commit a1486b0Copy full SHA for a1486b0
html5ever/src/macros.rs
@@ -7,22 +7,19 @@
7
// option. This file may not be copied, modified, or distributed
8
// except according to those terms.
9
10
-macro_rules! unwrap_or_else {
11
- ($opt:expr, $else_block:block) => {{
12
- let Some(x) = $opt else { $else_block };
13
- x
14
- }};
15
-}
16
-
17
macro_rules! unwrap_or_return {
18
- ($opt:expr) => {
19
- unwrap_or_else!($opt, {
+ ($opt:expr) => {{
+ let Some(x) = $opt else {
20
return;
21
- })
22
- };
23
- ($opt:expr, $retval:expr) => {
24
- unwrap_or_else!($opt, { return $retval })
25
+ };
+ x
+ }};
+ ($opt:expr, $retval:expr) => {{
+ return $retval;
26
}
27
28
macro_rules! time {
0 commit comments