diff options
Diffstat (limited to 'src/command/publish_archive.rs')
| -rw-r--r-- | src/command/publish_archive.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command/publish_archive.rs b/src/command/publish_archive.rs index 96dda86..289b0c8 100644 --- a/src/command/publish_archive.rs +++ b/src/command/publish_archive.rs @@ -1,5 +1,5 @@ use crate::configuration::Configuration; -use std::io::{Error, ErrorKind::Other, Result}; +use std::io::{Error, Result}; use std::process::{Command, Stdio}; const COMMAND: &str = "rsync"; @@ -24,7 +24,7 @@ impl super::Command for PublishArchive { _: &str, ) -> Result<()> { let input = input.ok_or_else(|| { - Error::new(Other, "You must provide a location to publish the archive") + Error::other("You must provide a location to publish the archive") })?; Command::new(COMMAND) @@ -32,7 +32,7 @@ impl super::Command for PublishArchive { .stdout(Stdio::null()) .stderr(Stdio::null()) .status() - .map_err(|_| Error::new(Other, "Publishing requires rsync"))?; + .map_err(|_| Error::other("Publishing requires rsync"))?; Command::new(COMMAND) .arg("-r") @@ -44,7 +44,7 @@ impl super::Command for PublishArchive { .stdout(Stdio::null()) .stderr(Stdio::null()) .status() - .map_err(|_| Error::new(Other, "Rsync failed to publish."))?; + .map_err(|_| Error::other("Rsync failed to publish."))?; Ok(()) } |