From 1be49aaaab973eccf6f47cab36a4f3530143445a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Sun, 11 Apr 2021 22:00:04 +0200 Subject: ? -> into --- mumctl/src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mumctl/src/main.rs b/mumctl/src/main.rs index dbd62c6..5abed50 100644 --- a/mumctl/src/main.rs +++ b/mumctl/src/main.rs @@ -301,7 +301,7 @@ fn match_opt() -> Result<(), Error> { } } _ => { - return Err(CliError::ConfigKeyNotFound(key))?; + return Err(CliError::ConfigKeyNotFound(key).into()); } }, Command::ConfigReload => { @@ -477,7 +477,7 @@ fn match_server_command(server_command: Server, config: &mut Config) -> Result<( password, } => { if config.servers.iter().any(|s| s.name == name) { - return Err(CliError::ServerAlreadyExists(name))?; + return Err(CliError::ServerAlreadyExists(name).into()); } else { config.servers.push(ServerConfig { name, @@ -498,7 +498,7 @@ fn match_server_command(server_command: Server, config: &mut Config) -> Result<( } Server::List => { if config.servers.is_empty() { - return Err(CliError::NoServers)?; + return Err(CliError::NoServers.into()); } let longest = config @@ -542,11 +542,11 @@ fn match_server_command(server_command: Server, config: &mut Config) -> Result<( } Ok(Err(e)) => { error!("{}", e); - return Err(e)?; + return Err(e.into()); } Err(e) => { error!("{}", e); - return Err(e)?; + return Err(e.into()); } } } -- cgit v1.2.1