From 8008b7d5104ebb84857b17543b8554b037dc28e6 Mon Sep 17 00:00:00 2001 From: Ahurac Date: Tue, 9 Apr 2024 12:18:26 +0200 Subject: [PATCH] main : ajout fonction `exit` --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index 0248647..631d390 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,11 @@ use std::io; use std::io::Write; +fn exit() { + println!("exit"); + std::process::exit(0); +} + fn main() { let mut user_input = String::new(); let mut bytes_read = 1;