diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-10-30 17:39:18 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-10-30 17:39:18 +0000 |
commit | eee55d4663084a01ce80f5ee201d8e1e345417cd (patch) | |
tree | 7fc1497065d00cfba1cd00523ed9545886745da1 /crates/ra_mbe/src/mbe_expander | |
parent | d929f9c49bceb3b7c32ea45c5e55c42f168bbf34 (diff) | |
parent | b441b4e8effeaf4532fd2e45c4d864480857c49e (diff) |
Merge #2129
2129: Some clippy fixes r=kjeremy a=kjeremy
Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ra_mbe/src/mbe_expander')
-rw-r--r-- | crates/ra_mbe/src/mbe_expander/matcher.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_mbe/src/mbe_expander/matcher.rs b/crates/ra_mbe/src/mbe_expander/matcher.rs index 0548e8512..33b9d483d 100644 --- a/crates/ra_mbe/src/mbe_expander/matcher.rs +++ b/crates/ra_mbe/src/mbe_expander/matcher.rs | |||
@@ -123,7 +123,6 @@ fn match_subtree( | |||
123 | } | 123 | } |
124 | None => bindings.push_optional(name), | 124 | None => bindings.push_optional(name), |
125 | } | 125 | } |
126 | () | ||
127 | } | 126 | } |
128 | Op::Repeat { subtree, kind, separator } => { | 127 | Op::Repeat { subtree, kind, separator } => { |
129 | match_repeat(bindings, subtree, kind, separator, src)? | 128 | match_repeat(bindings, subtree, kind, separator, src)? |
@@ -159,7 +158,7 @@ impl<'a> TtIter<'a> { | |||
159 | pub(crate) fn expect_lifetime(&mut self) -> Result<&tt::Ident, ()> { | 158 | pub(crate) fn expect_lifetime(&mut self) -> Result<&tt::Ident, ()> { |
160 | let ident = self.expect_ident()?; | 159 | let ident = self.expect_ident()?; |
161 | // check if it start from "`" | 160 | // check if it start from "`" |
162 | if ident.text.chars().next() != Some('\'') { | 161 | if !ident.text.starts_with('\'') { |
163 | return Err(()); | 162 | return Err(()); |
164 | } | 163 | } |
165 | Ok(ident) | 164 | Ok(ident) |