mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 04:01:38 +08:00
Fix some dumb clippies
Some checks failed
make test / ubuntu (push) Waiting to run
make test / ubuntu-32bit-static-pcre2 (push) Waiting to run
make test / ubuntu-asan (push) Waiting to run
make test / macos (push) Waiting to run
Rust checks / rustfmt (push) Waiting to run
Rust checks / clippy (push) Waiting to run
Lock threads / lock (push) Has been cancelled
Some checks failed
make test / ubuntu (push) Waiting to run
make test / ubuntu-32bit-static-pcre2 (push) Waiting to run
make test / ubuntu-asan (push) Waiting to run
make test / macos (push) Waiting to run
Rust checks / rustfmt (push) Waiting to run
Rust checks / clippy (push) Waiting to run
Lock threads / lock (push) Has been cancelled
This commit is contained in:
parent
5ee51492be
commit
3e3aa08c28
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 New Issue
Block a user