diff options
Diffstat (limited to 'crates/ra_mbe')
-rw-r--r-- | crates/ra_mbe/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs index b92312d52..15f000175 100644 --- a/crates/ra_mbe/src/lib.rs +++ b/crates/ra_mbe/src/lib.rs | |||
@@ -108,7 +108,7 @@ impl MacroRules { | |||
108 | 108 | ||
109 | // Note that TokenId is started from zero, | 109 | // Note that TokenId is started from zero, |
110 | // We have to add 1 to prevent duplication. | 110 | // We have to add 1 to prevent duplication. |
111 | let shift = max_id(tt).unwrap_or(0) + 1; | 111 | let shift = max_id(tt).map_or(0, |it| it + 1); |
112 | Ok(MacroRules { rules, shift }) | 112 | Ok(MacroRules { rules, shift }) |
113 | } | 113 | } |
114 | 114 | ||