aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/lib.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-21 06:12:36 +0000
committerGitHub <[email protected]>2019-12-21 06:12:36 +0000
commit1cbef27ff857803fbee123e6730b83e1ef154f6c (patch)
tree7d45ce377fb8f4c7019bb74381228b94f397110f /crates/ra_mbe/src/lib.rs
parent6eab968c601637361e8fbd1ee93ded1b0d967bee (diff)
parent0d5d63a80ea08f2af439bcc72fff9b24d144c70d (diff)
Merge #2625
2625: Clippy lints r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ra_mbe/src/lib.rs')
-rw-r--r--crates/ra_mbe/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs
index 45dad2d10..2c6ae5658 100644
--- a/crates/ra_mbe/src/lib.rs
+++ b/crates/ra_mbe/src/lib.rs
@@ -97,7 +97,9 @@ impl Shift {
97 tt::Leaf::Literal(lit) => lit.id = self.shift(lit.id), 97 tt::Leaf::Literal(lit) => lit.id = self.shift(lit.id),
98 }, 98 },
99 tt::TokenTree::Subtree(tt) => { 99 tt::TokenTree::Subtree(tt) => {
100 tt.delimiter.as_mut().map(|it: &mut Delimiter| it.id = self.shift(it.id)); 100 if let Some(it) = tt.delimiter.as_mut() {
101 it.id = self.shift(it.id);
102 };
101 self.shift_all(tt) 103 self.shift_all(tt)
102 } 104 }
103 } 105 }