Skip to content

Commit 89ea3f0

Browse files
perehonchukfacebook-github-bot
authored andcommitted
refactor visit_type_expr_err_mut
Summary: as per title Reviewed By: rajneesh Differential Revision: D63901103 fbshipit-source-id: 3b1be0b6d16cde750b9badc592aa09b6633270fb
1 parent 9efb6ca commit 89ea3f0

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

starlark_syntax/src/syntax/uniplate.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -557,15 +557,12 @@ impl<P: AstPayload> ExprP<P> {
557557
&mut self,
558558
f: &mut impl FnMut(&mut AstTypeExprP<P>) -> Result<(), E>,
559559
) -> Result<(), E> {
560-
match self {
561-
ExprP::Lambda(lambda) => {
562-
for param in &mut lambda.params {
563-
if let (_, Some(ty), _) = param.split_mut() {
564-
f(ty)?;
565-
}
560+
if let ExprP::Lambda(lambda) = self {
561+
for param in &mut lambda.params {
562+
if let (_, Some(ty), _) = param.split_mut() {
563+
f(ty)?;
566564
}
567565
}
568-
_ => {}
569566
}
570567
self.visit_expr_err_mut(|expr| expr.visit_type_expr_err_mut(f))
571568
}

0 commit comments

Comments
 (0)