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

This commit is contained in:
Peter Ammon 2024-10-27 18:17:55 -07:00
parent 5ee51492be
commit 3e3aa08c28

View File

@ -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 => (),
} }
} }
} }