aboutsummaryrefslogtreecommitdiff
path: root/src/command/publish_archive.rs
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-07-18 13:22:04 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-07-18 13:22:04 +0200
commit8d11eb64efa67f1d7a6902300fdffd2c7c08df6c (patch)
tree119de904ee30468726d7f58680e1ba47c5dd267e /src/command/publish_archive.rs
parent5d8b65a9a5742e5db705cf4c8164138eca20c355 (diff)
Apply clippy and formatting
Diffstat (limited to 'src/command/publish_archive.rs')
-rw-r--r--src/command/publish_archive.rs8
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(())
}