aboutsummaryrefslogtreecommitdiffstats
path: root/mumctl
diff options
context:
space:
mode:
Diffstat (limited to 'mumctl')
-rw-r--r--mumctl/src/main.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/mumctl/src/main.rs b/mumctl/src/main.rs
index 11c51e6..2805545 100644
--- a/mumctl/src/main.rs
+++ b/mumctl/src/main.rs
@@ -128,15 +128,11 @@ fn main() {
} else if let Some(matches) = matches.subcommand_matches("add") {
match_server_add(matches, &mut config);
} else if let Some(_) = matches.subcommand_matches("list") {
- let servers = config
- .as_ref()
- .map(|e| e.servers.as_ref().map(|e| e.clone()).unwrap_or(Vec::new()))
- .unwrap_or(Vec::new());
- if servers.len() == 0 {
+ if config.servers.len() == 0 {
println!("{} No servers in config", "warning:".yellow());
}
- for (server, response) in servers
- .into_iter()
+ for (server, response) in config.servers
+ .iter()
.map(|e| {
let response = send_command(Command::ServerStatus {
host: e.host.clone(),