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/remote/git.rs | |
| parent | 5d8b65a9a5742e5db705cf4c8164138eca20c355 (diff) | |
Apply clippy and formatting
Diffstat (limited to 'src/remote/git.rs')
| -rw-r--r-- | src/remote/git.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/remote/git.rs b/src/remote/git.rs index 3290793..c8aaf46 100644 --- a/src/remote/git.rs +++ b/src/remote/git.rs @@ -1,4 +1,4 @@ -use std::io::{Error, ErrorKind::Other, Result}; +use std::io::{Error, Result}; use std::path::Path; use std::process::{Command, Stdio}; use std::time::{SystemTime, UNIX_EPOCH}; @@ -27,7 +27,7 @@ impl super::Remote for Git { fn sync_up(&self, remote: &str, directory: &Path) -> Result<()> { let timestamp = SystemTime::now() .duration_since(UNIX_EPOCH) - .map_err(|_| Error::new(Other, "Invalid time"))? + .map_err(|_| Error::other("Invalid time"))? .as_millis(); let commit_name = format!("blog-sync-up-{timestamp}"); @@ -45,7 +45,7 @@ impl super::Remote for Git { .stdout(Stdio::null()) .stderr(Stdio::null()) .status() - .map_err(|_| Error::new(Other, "Failed while performing sync up with git"))?; + .map_err(|_| Error::other("Failed while performing sync up with git"))?; } Ok(()) @@ -66,7 +66,7 @@ impl super::Remote for Git { .stdout(Stdio::null()) .stderr(Stdio::null()) .status() - .map_err(|_| Error::new(Other, "Failed while performing sync down with git"))?; + .map_err(|_| Error::other("Failed while performing sync down with git"))?; } Ok(()) } |