Skip to content

Commit c256bba

Browse files
committed
Replace a match with an if let to make clippy happy
1 parent 312d13b commit c256bba

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/lib.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ where
164164
return Ok(None);
165165
}
166166

167-
match self.state {
168-
State::Combined(ref mut pos, ref str) => match str.as_bytes().get(*pos) {
167+
if let State::Combined(ref mut pos, ref str) = self.state {
168+
match str.as_bytes().get(*pos) {
169169
None => {
170170
self.state = State::NotInteresting;
171171
return self.forward();
@@ -184,9 +184,7 @@ where
184184
*pos += 1;
185185
return Ok(Some(Argument::Short(*ch as char)));
186186
}
187-
},
188-
189-
_ => {}
187+
}
190188
}
191189

192190
let arg = match self.iter.next() {

0 commit comments

Comments
 (0)