Skip to content

Commit

Permalink
chore: clippy, fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mautamu committed Dec 23, 2023
1 parent 9b34011 commit 1ca40a8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/operations/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl Apply {
}
trace!("{:?}", &path);
match fs::remove_dir_all(&dir) {
Ok(_) => {
Ok(()) => {
warn!("Removed old current directory");
}
Err(_) => {
Expand Down
4 changes: 2 additions & 2 deletions src/operations/migrate_toml_to_ron.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions src/operations/support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion src/operations/uninstall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/operations/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() != *"*"
Expand Down

0 comments on commit 1ca40a8

Please sign in to comment.