From 5efb7a984ad3da04a7cc2e2ce8fe58cf75768449 Mon Sep 17 00:00:00 2001 From: arty Date: Thu, 19 Oct 2023 09:14:23 -0700 Subject: [PATCH] fmt + clippy --- src/compiler/preprocessor/macros.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler/preprocessor/macros.rs b/src/compiler/preprocessor/macros.rs index f5ccb9f31..2064371df 100644 --- a/src/compiler/preprocessor/macros.rs +++ b/src/compiler/preprocessor/macros.rs @@ -26,9 +26,8 @@ fn match_quoted_string(body: Rc) -> Result<(Srcloc, Vec), CompileErr> } fn match_atom(body: Rc) -> Result<(Srcloc, Vec), CompileErr> { - match body.borrow() { - SExp::Atom(al, an) => return Ok((al.clone(), an.clone())), - _ => {} + if let SExp::Atom(al, an) = body.borrow() { + return Ok((al.clone(), an.clone())); } Err(CompileErr(body.loc(), "atom required".to_string())) }