diff options
| author | Eskil Queseth <eskilq@kth.se> | 2020-11-05 00:44:48 +0100 |
|---|---|---|
| committer | Eskil Queseth <eskilq@kth.se> | 2020-11-05 00:44:48 +0100 |
| commit | 7a4e0c79be76444a8f3a8d4019175a8eb84d333e (patch) | |
| tree | ff4277bdeafd4aaf1c18a6d80c14ddc1c529ac89 /mumctl/src/main.rs | |
| parent | 22579ced3d1d847a14683fe3b47fa2076df01751 (diff) | |
| download | mum-7a4e0c79be76444a8f3a8d4019175a8eb84d333e.tar.gz | |
cargo fmt
Diffstat (limited to 'mumctl/src/main.rs')
| -rw-r--r-- | mumctl/src/main.rs | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/mumctl/src/main.rs b/mumctl/src/main.rs index 478ecaa..22e08ec 100644 --- a/mumctl/src/main.rs +++ b/mumctl/src/main.rs @@ -111,30 +111,32 @@ fn main() { .arg(Arg::with_name("user").required(true)) .setting(AppSettings::SubcommandsNegateReqs), ) - .subcommand(SubCommand::with_name("mute") - .subcommand(SubCommand::with_name("true") - .alias("1")) - .subcommand(SubCommand::with_name("false") - .alias("0")) - .subcommand(SubCommand::with_name("toggle")) - .setting(AppSettings::SubcommandRequiredElseHelp)) - .subcommand(SubCommand::with_name("deafen") - .subcommand(SubCommand::with_name("true") - .alias("1")) - .subcommand(SubCommand::with_name("false") - .alias("0")) - .subcommand(SubCommand::with_name("toggle")) - .setting(AppSettings::SubcommandRequiredElseHelp)) - .subcommand(SubCommand::with_name("user") - .arg(Arg::with_name("user").required(true)) - .subcommand(SubCommand::with_name("mute") - .subcommand(SubCommand::with_name("true") - .alias("1")) - .subcommand(SubCommand::with_name("false") - .alias("0")) + .subcommand( + SubCommand::with_name("mute") + .subcommand(SubCommand::with_name("true").alias("1")) + .subcommand(SubCommand::with_name("false").alias("0")) .subcommand(SubCommand::with_name("toggle")) - .setting(AppSettings::SubcommandRequiredElseHelp)) - .setting(AppSettings::SubcommandRequiredElseHelp)); + .setting(AppSettings::SubcommandRequiredElseHelp), + ) + .subcommand( + SubCommand::with_name("deafen") + .subcommand(SubCommand::with_name("true").alias("1")) + .subcommand(SubCommand::with_name("false").alias("0")) + .subcommand(SubCommand::with_name("toggle")) + .setting(AppSettings::SubcommandRequiredElseHelp), + ) + .subcommand( + SubCommand::with_name("user") + .arg(Arg::with_name("user").required(true)) + .subcommand( + SubCommand::with_name("mute") + .subcommand(SubCommand::with_name("true").alias("1")) + .subcommand(SubCommand::with_name("false").alias("0")) + .subcommand(SubCommand::with_name("toggle")) + .setting(AppSettings::SubcommandRequiredElseHelp), + ) + .setting(AppSettings::SubcommandRequiredElseHelp), + ); let matches = app.clone().get_matches(); @@ -155,7 +157,8 @@ fn main() { if config.servers.len() == 0 { println!("{} No servers in config", "warning:".yellow()); } - for (server, response) in config.servers + for (server, response) in config + .servers .iter() .map(|e| { let response = send_command(Command::ServerStatus { @@ -251,8 +254,8 @@ fn main() { //needs work on mumd to implement } } else if let Some(matches) = matches.subcommand_matches("mute") { - let command = Command::MuteSelf( - if let Some(_matches) = matches.subcommand_matches("true") { + let command = + Command::MuteSelf(if let Some(_matches) = matches.subcommand_matches("true") { Some(true) } else if let Some(_matches) = matches.subcommand_matches("false") { Some(false) @@ -263,8 +266,8 @@ fn main() { }); err_print!(send_command(command)); } else if let Some(matches) = matches.subcommand_matches("deafen") { - let command = Command::DeafenSelf( - if let Some(_matches) = matches.subcommand_matches("true") { + let command = + Command::DeafenSelf(if let Some(_matches) = matches.subcommand_matches("true") { Some(true) } else if let Some(_matches) = matches.subcommand_matches("false") { Some(false) |
