From 0d5d63a80ea08f2af439bcc72fff9b24d144c70d Mon Sep 17 00:00:00 2001 From: kjeremy Date: Fri, 20 Dec 2019 15:14:30 -0500 Subject: Clippy lints --- crates/ra_mbe/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/ra_mbe/src/lib.rs') 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 { tt::Leaf::Literal(lit) => lit.id = self.shift(lit.id), }, tt::TokenTree::Subtree(tt) => { - tt.delimiter.as_mut().map(|it: &mut Delimiter| it.id = self.shift(it.id)); + if let Some(it) = tt.delimiter.as_mut() { + it.id = self.shift(it.id); + }; self.shift_all(tt) } } -- cgit v1.2.3