Skip to content

Commit

Permalink
Fix new clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
canac committed Jan 10, 2025
1 parent 4e8c33a commit 510b27e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,9 @@ impl Registry {
// Find and return the project that matches the current working directory, if any
pub fn match_cwd(&self, deps: &impl WorkingDirectory) -> Result<Option<(&String, &Project)>> {
let cwd = deps.get_cwd()?;
Ok(self.iter_projects().find(|(_, project)| {
project
.directory
.as_ref()
.map_or(false, |directory| directory == &cwd)
}))
Ok(self
.iter_projects()
.find(|(_, project)| project.directory.as_ref() == Some(&cwd)))
}

// Normalize a potential project name by stripping out invalid characters
Expand Down

0 comments on commit 510b27e

Please sign in to comment.