From 92500fd85b08d15ccbd780fce48a99e9d4945206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tymoteusz=20Wo=C5=82od=C5=BAko?= Date: Wed, 1 Nov 2023 09:44:57 +0100 Subject: [PATCH] exit(0) -> return in REPL --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 60a3d6d..25c46c1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,7 +31,7 @@ fn main() { loop { match read_sexpr(reader) { Ok(ref sexpr) => eval_and_print(sexpr, env), - Err(ReadError::Interrupted) => std::process::exit(0), + Err(ReadError::Interrupted) => return, Err(msg) => println!("Error: {}", msg), } }