Fix some more clippy warnings

This commit is contained in:
Joshua Nelson 2020-10-26 20:02:06 -04:00
parent 388ef34904
commit bfecb18771
16 changed files with 71 additions and 97 deletions

View file

@ -134,10 +134,7 @@ enum Stack<'a, T> {
impl<'a, T> Stack<'a, T> {
/// Returns whether a stack is empty.
fn is_empty(&self) -> bool {
match *self {
Stack::Empty => true,
_ => false,
}
matches!(*self, Stack::Empty)
}
/// Returns a new stack with an element of top.