Fix some more clippy warnings
This commit is contained in:
parent
388ef34904
commit
bfecb18771
16 changed files with 71 additions and 97 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue