aboutsummaryrefslogtreecommitdiffstats
path: root/mumctl
diff options
context:
space:
mode:
Diffstat (limited to 'mumctl')
-rw-r--r--mumctl/src/main.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/mumctl/src/main.rs b/mumctl/src/main.rs
index 6e97296..9411b8f 100644
--- a/mumctl/src/main.rs
+++ b/mumctl/src/main.rs
@@ -172,11 +172,11 @@ fn main() {
};
if let Some(config) = config {
- config.write_default_cfg();
+ config.write_default_cfg().unwrap();
}
}
-fn match_server_connect(matches : &clap::ArgMatches<>) {
+fn match_server_connect(matches : &clap::ArgMatches<'_>) {
let host = matches.value_of("host").unwrap();
let username = matches.value_of("username").unwrap();
let port = match matches.value_of("port").map(|e| e.parse()) {
@@ -194,7 +194,7 @@ fn match_server_connect(matches : &clap::ArgMatches<>) {
}
}
-fn match_server_config(matches: &clap::ArgMatches<>, config: &mut mumlib::config::Config) {
+fn match_server_config(matches: &clap::ArgMatches<'_>, config: &mut mumlib::config::Config) {
let server_name = matches.value_of("server_name").unwrap();
if let Some(servers) = &mut config.servers {
let server = servers
@@ -252,7 +252,7 @@ fn match_server_config(matches: &clap::ArgMatches<>, config: &mut mumlib::config
}
}
-fn match_server_rename(matches: &clap::ArgMatches<>, config: &mut mumlib::config::Config) {
+fn match_server_rename(matches: &clap::ArgMatches<'_>, config: &mut mumlib::config::Config) {
if let Some(servers) = &mut config.servers {
let prev_name = matches.value_of("prev_name").unwrap();
let next_name = matches.value_of("next_name").unwrap();
@@ -266,7 +266,7 @@ fn match_server_rename(matches: &clap::ArgMatches<>, config: &mut mumlib::config
}
}
-fn match_server_remove(matches: &clap::ArgMatches<>, config: &mut mumlib::config::Config) {
+fn match_server_remove(matches: &clap::ArgMatches<'_>, config: &mut mumlib::config::Config) {
let name = matches.value_of("name").unwrap();
if let Some(servers) = &mut config.servers {
match servers.iter().position(|server| server.name == name) {
@@ -282,7 +282,7 @@ fn match_server_remove(matches: &clap::ArgMatches<>, config: &mut mumlib::config
}
}
-fn match_server_add(matches: &clap::ArgMatches<>, config: &mut mumlib::config::Config) {
+fn match_server_add(matches: &clap::ArgMatches<'_>, config: &mut mumlib::config::Config) {
let name = matches.value_of("name").unwrap().to_string();
let host = matches.value_of("host").unwrap().to_string();
// optional arguments map None to None
@@ -364,7 +364,7 @@ fn print_channel(channel: &Channel, depth: usize) {
);
for user in &channel.users {
println!(
- "{}-{}",
+ "{}- {}",
iter::repeat(INDENTATION)
.take(depth + 1)
.collect::<String>(),