Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Dec 13, 2024
1 parent 7f7975a commit 6a1ac81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/rattler_menuinst/src/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -752,9 +752,9 @@ impl MacOSMenu {
fs_err::remove_dir_all(&self.directories.location).unwrap_or_else(|e| {
tracing::warn!("Failed to remove directory: {e}. Ignoring error.");
});
return Ok(vec![self.directories.location.clone()]);
Ok(vec![self.directories.location.clone()])
} else {
return Ok(vec![]);
Ok(vec![])
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions crates/rattler_menuinst/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ impl BaseMenuItemPlaceholders {
pub fn new(base_prefix: &Path, prefix: &Path, platform: Platform) -> Self {
let dist_name = |p: &Path| {
p.file_name()
.map(|s| s.to_string_lossy().to_string())
.unwrap_or_else(|| "empty".to_string())
.map_or_else(|| "empty".to_string(), |s| s.to_string_lossy().to_string())
};

let (python, base_python) = if platform.is_windows() {
Expand Down

0 comments on commit 6a1ac81

Please sign in to comment.