Skip to content

Commit

Permalink
clippy: use inspect when map returns the original item (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pi-Cla authored Sep 10, 2024
1 parent 2dbe19f commit 7a62324
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 2 additions & 3 deletions bulk-updater/src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,11 @@ pub fn attempt_cargo_update_before_revendor(
"🔼 Attempting to update in progress at {}",
package_path.to_string_lossy()
);
let cargo_vendor_params = does_have_cargo_vendor(package_path).map_err(|err| {
let cargo_vendor_params = does_have_cargo_vendor(package_path).inspect_err(|_| {
tracing::error!(
"❌ Error -- {} is not setup for cargo vendor!",
package_path.to_string_lossy()
);
err
)
})?;
tracing::info!(
?cargo_vendor_params,
Expand Down
5 changes: 1 addition & 4 deletions cargo/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,7 @@ pub fn process_globs(src: &Path) -> io::Result<PathBuf> {
// Take the last item.
globs
.pop()
.map(|item| {
info!("🍿 Vendoring for src '{}'", item.display());
item
})
.inspect(|item| info!("🍿 Vendoring for src '{}'", item.display()))
.ok_or_else(|| {
error!("No files/directories matched src glob input");
io::Error::new(
Expand Down

0 comments on commit 7a62324

Please sign in to comment.