Skip to content

Commit

Permalink
Improve some error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dalen committed Jun 13, 2018
1 parent e1d668d commit 6cd3cc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ fn main() {
}
}
Err(error) => {
println!("Error: {:?}", error);
println!("Error: {}", error);
}
}
}
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit 6cd3cc3

Please sign in to comment.