X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/36a4680d18de012e2e5c732f9db161dafa884344..a04ba49c504d5ffa2fd902e210875c0a41c62d91:/src/command/remove_remote.rs?ds=inline diff --git a/src/command/remove_remote.rs b/src/command/remove_remote.rs index b2f554c..7590487 100644 --- a/src/command/remove_remote.rs +++ b/src/command/remove_remote.rs @@ -1,6 +1,6 @@ -use std::fs::remove_file; use std::io::Result; use crate::configuration::Configuration; +use crate::remote::remove; pub struct RemoveRemote; @@ -16,10 +16,7 @@ impl super::Command for RemoveRemote { } fn execute(&self, _: Option<&String>, configuration: &Configuration, _: &String) -> Result<()> { - if configuration.remote_config.exists() { - remove_file(&configuration.remote_config)?; - } - return Ok(()) + remove(&configuration.remote_config) } fn after_dependencies(&self) -> Vec> {