Skip to content

Commit

Permalink
fix: Clippy lints for compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
mautamu committed Aug 6, 2023
1 parent 3c2c251 commit f9df66c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
9 changes: 3 additions & 6 deletions src/operations/migrate_toml_to_ron.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,9 @@ impl Migrate {
}

fn migrate(path: &PathBuf) -> Result<(), LeftError> {
let theme = match load_theme_file(path) {
Ok(theme) => theme,
Err(_) => {
return Err(LeftError::from("Theme not found"));
}
};
let Ok(theme) = load_theme_file(path) else {
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) {
Expand Down
5 changes: 1 addition & 4 deletions src/operations/uninstall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ impl Uninstall {
"{}",
"Looking for theme to uninstall . . . ".bright_blue().bold()
);
let theme = match Theme::find_installed(config, &self.name) {
Some(target_theme) => target_theme,
None => 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
Expand Down

0 comments on commit f9df66c

Please sign in to comment.