mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Fix some dumb clippies
This commit is contained in:
parent
5ee51492be
commit
3e3aa08c28
1 changed files with 4 additions and 6 deletions
10
src/ast.rs
10
src/ast.rs
|
@ -43,9 +43,8 @@ pub trait Acceptor {
|
|||
|
||||
impl<T: Acceptor> Acceptor for Option<T> {
|
||||
fn accept<'a>(&'a self, visitor: &mut dyn NodeVisitor<'a>, reversed: bool) {
|
||||
match self {
|
||||
Some(node) => node.accept(visitor, reversed),
|
||||
None => (),
|
||||
if let Some(node) = self {
|
||||
node.accept(visitor, reversed)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -90,9 +89,8 @@ trait AcceptorMut {
|
|||
|
||||
impl<T: AcceptorMut> AcceptorMut for Option<T> {
|
||||
fn accept_mut(&mut self, visitor: &mut dyn NodeVisitorMut, reversed: bool) {
|
||||
match self {
|
||||
Some(node) => node.accept_mut(visitor, reversed),
|
||||
None => (),
|
||||
if let Some(node) = self {
|
||||
node.accept_mut(visitor, reversed)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue