mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-28 20:34:07 +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> {
|
impl<T: Acceptor> Acceptor for Option<T> {
|
||||||
fn accept<'a>(&'a self, visitor: &mut dyn NodeVisitor<'a>, reversed: bool) {
|
fn accept<'a>(&'a self, visitor: &mut dyn NodeVisitor<'a>, reversed: bool) {
|
||||||
match self {
|
if let Some(node) = self {
|
||||||
Some(node) => node.accept(visitor, reversed),
|
node.accept(visitor, reversed)
|
||||||
None => (),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,9 +89,8 @@ trait AcceptorMut {
|
||||||
|
|
||||||
impl<T: AcceptorMut> AcceptorMut for Option<T> {
|
impl<T: AcceptorMut> AcceptorMut for Option<T> {
|
||||||
fn accept_mut(&mut self, visitor: &mut dyn NodeVisitorMut, reversed: bool) {
|
fn accept_mut(&mut self, visitor: &mut dyn NodeVisitorMut, reversed: bool) {
|
||||||
match self {
|
if let Some(node) = self {
|
||||||
Some(node) => node.accept_mut(visitor, reversed),
|
node.accept_mut(visitor, reversed)
|
||||||
None => (),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user