diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-18 13:22:04 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-18 13:22:04 +0200 |
| commit | 8d11eb64efa67f1d7a6902300fdffd2c7c08df6c (patch) | |
| tree | 119de904ee30468726d7f58680e1ba47c5dd267e /src/command/publish.rs | |
| parent | 5d8b65a9a5742e5db705cf4c8164138eca20c355 (diff) | |
Apply clippy and formatting
Diffstat (limited to 'src/command/publish.rs')
| -rw-r--r-- | src/command/publish.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command/publish.rs b/src/command/publish.rs index 388792f..4b174de 100644 --- a/src/command/publish.rs +++ b/src/command/publish.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,14 +24,14 @@ impl super::Command for Publish { _: &str, ) -> Result<()> { let input = input - .ok_or_else(|| Error::new(Other, "You must provide a location to publish the blog"))?; + .ok_or_else(|| Error::other("You must provide a location to publish the blog"))?; Command::new(COMMAND) .arg("--version") .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") @@ -43,7 +43,7 @@ impl super::Command for Publish { .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(()) } |