Skip to content

Commit

Permalink
fmt + clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
prozacchiwawa committed Oct 19, 2023
1 parent e996ec9 commit 5efb7a9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/compiler/preprocessor/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ fn match_quoted_string(body: Rc<SExp>) -> Result<(Srcloc, Vec<u8>), CompileErr>
}

fn match_atom(body: Rc<SExp>) -> Result<(Srcloc, Vec<u8>), 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()))
}
Expand Down

0 comments on commit 5efb7a9

Please sign in to comment.