From 8d11eb64efa67f1d7a6902300fdffd2c7c08df6c Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Fri, 18 Jul 2025 13:22:04 +0200 Subject: Apply clippy and formatting --- src/command/publish.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/command/publish.rs') 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(()) } -- cgit