diff options
-rw-r--r-- | src/packages.rs | 6 | ||||
-rw-r--r-- | src/pathinfo.rs | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/packages.rs b/src/packages.rs index 5fb08d0..8efc928 100644 --- a/src/packages.rs +++ b/src/packages.rs | |||
@@ -65,9 +65,9 @@ impl Manager { | |||
65 | 65 | ||
66 | fn from_str(value: &str) -> Result<Self> { | 66 | fn from_str(value: &str) -> Result<Self> { |
67 | Ok(match value { | 67 | Ok(match value { |
68 | "fedora" => Box::new(Dnf), | 68 | "fedora" => Self::Dnf, |
69 | "arch" => Box::new(Pacman), | 69 | "arch" => Self::Pacman, |
70 | "gentoo" => Box::new(Portage), | 70 | "gentoo" => Self::Portage, |
71 | _ => return Err(Error::Unsupported), | 71 | _ => return Err(Error::Unsupported), |
72 | }) | 72 | }) |
73 | } | 73 | } |
diff --git a/src/pathinfo.rs b/src/pathinfo.rs index 80614cd..d0ab61a 100644 --- a/src/pathinfo.rs +++ b/src/pathinfo.rs | |||
@@ -392,13 +392,12 @@ mod tests { | |||
392 | } | 392 | } |
393 | 393 | ||
394 | #[test] | 394 | #[test] |
395 | fn compare_to_last_modified() -> color_eyre::Result<()> { | 395 | fn compare_to_last_modified() -> Result<()> { |
396 | 396 | ||
397 | let cwd = std::env::current_dir()?; | 397 | let cwd = std::env::current_dir()?; |
398 | let test_dir = format!("{}/backup-test-dir", cwd.display()); | 398 | let test_dir = format!("{}/backup-test-dir", cwd.display()); |
399 | 399 | ||
400 | let mut config = Config::default(); | 400 | let mut config = Config { root: "./backup-test".to_string(), ..Default::default() } ; |
401 | config.root = "./backup-test".to_string(); | ||
402 | config | 401 | config |
403 | .directories | 402 | .directories |
404 | .push(format!("r:{test_dir}")); | 403 | .push(format!("r:{test_dir}")); |