aboutsummaryrefslogtreecommitdiff
path: root/src/remote/git.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/remote/git.rs')
-rw-r--r--src/remote/git.rs6
1 files changed, 3 insertions, 3 deletions
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()),