From da50da4e08e71afc941c896dda72456b465a3115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Sat, 31 Dec 2022 13:50:08 +0100 Subject: [PATCH] CLIPPY IS THE MASTER OF ALL! (especially anal retentiveness) --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 90f9340..c3e7a7a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -33,9 +33,8 @@ fn run(source: String) -> ErrorHandler { None => (), Some(ast) => { println!("AST generated ! {}", ast.dump()); - match evaluate(&mut error_handler, &ast) { - Some(v) => println!("Final evaluated value: {:?}", v), - None => (), + if let Some(v) = evaluate(&mut error_handler, &ast) { + println!("Final evaluated value: {:?}", v) } } }