summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2024-05-31 14:09:17 +0200
committerYuval Adam <_@yuv.al>2024-05-31 14:09:17 +0200
commita0f73e088846ddc31e10b7ad25bd533c11a06a6f (patch)
tree50769111a5e256f6f158206b68fe3e2198465f47
parent40203a408cf18f9a459d4848ed57ff5834dbdf74 (diff)
Cleanup post selection output
-rw-r--r--src/main.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 7098b07..5f6fa28 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -10,7 +10,15 @@ fn main() {
let channels = channels::get_channels();
sp.stop_with_newline();
- let ans: Result<Channel, InquireError> = Select::new("Select a channel", channels).prompt();
+ let ans: Result<Channel, InquireError> =
+ Select::new("Select channel from list:", channels).prompt();
- println!("\n{:?}", ans);
+ match ans {
+ Ok(ch) => {
+ println!("{:?}", ch);
+ }
+ Err(_e) => {
+ println!("\nNo channel selected, exiting.");
+ }
+ }
}