X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/d7fef30ac3f539975ef9edbba8e0af4a4e9ff3de..b17907faf8d9693cef94a6048d802bd4ced9102f:/src/remote/git.rs?ds=inline diff --git a/src/remote/git.rs b/src/remote/git.rs index a8a9010..5a79164 100644 --- a/src/remote/git.rs +++ b/src/remote/git.rs @@ -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()),