From 510b27ef4c24c85f20aaec7305b548bc35a6020d Mon Sep 17 00:00:00 2001 From: Caleb Cox Date: Fri, 10 Jan 2025 12:14:41 -0600 Subject: [PATCH] Fix new clippy lint --- src/registry.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/registry.rs b/src/registry.rs index cbf8016..5e6b16c 100644 --- a/src/registry.rs +++ b/src/registry.rs @@ -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> { 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