X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/36a4680d18de012e2e5c732f9db161dafa884344..c667f2401b3ada832f8456d1661ea3fba667fc91:/src/command/remove_remote.rs 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> {