From 6cd3cc326ce0c88a741ac2bd706916a101993e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Dal=C3=A9n?= Date: Wed, 13 Jun 2018 15:30:47 +0200 Subject: [PATCH] Improve some error messages --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index bb1b78e..dadfb83 100644 --- a/src/main.rs +++ b/src/main.rs @@ -122,7 +122,7 @@ fn main() { } } Err(error) => { - println!("Error: {:?}", error); + println!("Error: {}", error); } } } @@ -167,11 +167,11 @@ fn get_container( Some(n) => containers .iter() .find(|c| c.name == Some(n.to_string())) - .unwrap() + .expect(format!("No container called {} found in task", &n)) .clone(), None => { if containers.len() != 1 { - panic!(); + panic!("Task has more than one container and which one to run in was not specified with the -n flag."); } else { containers[0].clone() }