From 8ab26f7187c2b5ba06f13c7c2db49655cf9a1123 Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 2 Nov 2023 02:34:54 +1100 Subject: [PATCH] Confirmation for close --- src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.rs b/src/main.rs index a1d59df..ff67409 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,12 @@ fn main() { "Decode a message" => decode(), _ => panic!("Invalid option"), } + + // Ask for confirmation before closing + inquire::Confirm::new("Press enter to exit") + .with_default(true) + .prompt() + .unwrap(); } fn encode() {