]> git.r.bdr.sh - rbdr/blog/blobdiff - src/remote/git.rs
Deal with all lints
[rbdr/blog] / src / remote / git.rs
index a8a901055c4cdbb13b951ac65720d75259cafd6e..5a791646479b3e297d71b78ba1d2105eabc9ac8c 100644 (file)
@@ -1,5 +1,5 @@
 use std::io::{Error, ErrorKind::Other, Result};
-use std::path::PathBuf;
+use std::path::Path;
 use std::process::{Command, Stdio};
 use std::time::{SystemTime, UNIX_EPOCH};
 
@@ -17,7 +17,7 @@ impl super::Remote for Git {
         true
     }
 
-    fn sync_up(&self, remote: &str, directory: &PathBuf) -> Result<()> {
+    fn sync_up(&self, remote: &str, directory: &Path) -> Result<()> {
         let timestamp = SystemTime::now()
             .duration_since(UNIX_EPOCH)
             .map_err(|_| Error::new(Other, "Invalid time"))?
@@ -51,7 +51,7 @@ impl super::Remote for Git {
         Ok(())
     }
 
-    fn sync_down(&self, remote: &str, directory: &PathBuf) -> Result<()> {
+    fn sync_down(&self, remote: &str, directory: &Path) -> Result<()> {
         let commands = vec![
             format!("cd {} && git init -b main", directory.display()),
             format!("cd {} && git checkout .", directory.display()),