From 7179fa0262c92b124e5d444754a572b2cecbf5cd Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Mon, 30 Sep 2024 14:43:46 +0200 Subject: fix merge error --- src/packages.rs | 6 +++--- src/pathinfo.rs | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src') 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 { fn from_str(value: &str) -> Result { Ok(match value { - "fedora" => Box::new(Dnf), - "arch" => Box::new(Pacman), - "gentoo" => Box::new(Portage), + "fedora" => Self::Dnf, + "arch" => Self::Pacman, + "gentoo" => Self::Portage, _ => return Err(Error::Unsupported), }) } 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 { } #[test] - fn compare_to_last_modified() -> color_eyre::Result<()> { + fn compare_to_last_modified() -> Result<()> { let cwd = std::env::current_dir()?; let test_dir = format!("{}/backup-test-dir", cwd.display()); - let mut config = Config::default(); - config.root = "./backup-test".to_string(); + let mut config = Config { root: "./backup-test".to_string(), ..Default::default() } ; config .directories .push(format!("r:{test_dir}")); -- cgit v1.2.3