diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-21 16:11:21 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-21 16:11:21 +0100 |
commit | 56e61bdfea5454dec4408a4947e037bcd042c886 (patch) | |
tree | 0bc42cbfcf5b6b502ad9fc3079cb4bdc5e8f110f /crates/mbe/src/tt_iter.rs | |
parent | 25bf451c8426a68ecfdc3a1d1be1db9702dd41d8 (diff) | |
parent | 47747cd4120e260a144242aadd7732e11d133fe4 (diff) |
Merge #9165
9165: Apply some clippy suggestions r=matklad a=clemenswasser
Co-authored-by: Clemens Wasser <[email protected]>
Diffstat (limited to 'crates/mbe/src/tt_iter.rs')
-rw-r--r-- | crates/mbe/src/tt_iter.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/mbe/src/tt_iter.rs b/crates/mbe/src/tt_iter.rs index 5a4eca7bf..65da83476 100644 --- a/crates/mbe/src/tt_iter.rs +++ b/crates/mbe/src/tt_iter.rs | |||
@@ -121,10 +121,11 @@ impl<'a> TtIter<'a> { | |||
121 | 121 | ||
122 | parser::parse_fragment(&mut src, &mut sink, fragment_kind); | 122 | parser::parse_fragment(&mut src, &mut sink, fragment_kind); |
123 | 123 | ||
124 | let mut err = None; | 124 | let mut err = if !sink.cursor.is_root() || sink.error { |
125 | if !sink.cursor.is_root() || sink.error { | 125 | Some(err!("expected {:?}", fragment_kind)) |
126 | err = Some(err!("expected {:?}", fragment_kind)); | 126 | } else { |
127 | } | 127 | None |
128 | }; | ||
128 | 129 | ||
129 | let mut curr = buffer.begin(); | 130 | let mut curr = buffer.begin(); |
130 | let mut res = vec![]; | 131 | let mut res = vec![]; |