Skip to content

Commit

Permalink
Confirmation for close
Browse files Browse the repository at this point in the history
  • Loading branch information
lhvy committed Nov 1, 2023
1 parent 9d324c4 commit 8ab26f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 8ab26f7

Please sign in to comment.