diff --git a/src/operations/apply.rs b/src/operations/apply.rs index c1bc3fe..f610371 100644 --- a/src/operations/apply.rs +++ b/src/operations/apply.rs @@ -65,7 +65,7 @@ impl Apply { } trace!("{:?}", &path); match fs::remove_dir_all(&dir) { - Ok(_) => { + Ok(()) => { warn!("Removed old current directory"); } Err(_) => { diff --git a/src/operations/migrate_toml_to_ron.rs b/src/operations/migrate_toml_to_ron.rs index 5d8d56b..bef90b4 100644 --- a/src/operations/migrate_toml_to_ron.rs +++ b/src/operations/migrate_toml_to_ron.rs @@ -59,8 +59,8 @@ impl Migrate { fn migrate(path: &PathBuf) -> Result<(), LeftError> { let Ok(theme) = load_theme_file(path) else { - return Err(LeftError::from("Theme not found")); - }; + return Err(LeftError::from("Theme not found")); + }; let mut ron_path = path.clone(); ron_path.set_extension("ron"); match write_to_file(&ron_path, &theme) { diff --git a/src/operations/support.rs b/src/operations/support.rs index 722cf16..429a4fd 100644 --- a/src/operations/support.rs +++ b/src/operations/support.rs @@ -14,6 +14,9 @@ impl Support { /// # Errors /// /// Should not error. + /// + /// # Panics + /// May panic if xdg-open not found, or handler not set pub fn exec(&self, config: &mut Config) -> Result<(), errors::LeftError> { 'outer: for repo in &config.repos { trace!("Searching themes from {}", &repo.name); diff --git a/src/operations/uninstall.rs b/src/operations/uninstall.rs index d40d668..4847551 100644 --- a/src/operations/uninstall.rs +++ b/src/operations/uninstall.rs @@ -26,7 +26,9 @@ impl Uninstall { "{}", "Looking for theme to uninstall . . . ".bright_blue().bold() ); - let Some(theme) = Theme::find_installed(config, &self.name) else { return Err(LeftError::from("Theme not found")) }; + let Some(theme) = Theme::find_installed(config, &self.name) else { + return Err(LeftError::from("Theme not found")); + }; if let Some(directory) = theme.directory { let path = Path::new(&directory); if self.noconfirm diff --git a/src/operations/upgrade.rs b/src/operations/upgrade.rs index e2f5f32..892d9da 100644 --- a/src/operations/upgrade.rs +++ b/src/operations/upgrade.rs @@ -76,7 +76,7 @@ impl Upgrade { ); let git_repo = Repository::open(theme_directory)?; match fetch_origin_main(&git_repo) { - Ok(_) => { + Ok(()) => { //if defined, attempt to checkout the specific index if theme.commit.is_some() && theme.commit.clone().unwrap_or_default() != *"*"