Skip to content

Commit

Permalink
chore: fix new clippy/fmt issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ysndr committed Jan 24, 2024
1 parent 2b2c2c1 commit 3dad968
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cli/flox/src/utils/openers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ impl Browser {
"linux" => {
let path_var =
env::var("PATH").map_err(|_| "Could not read PATH variable".to_string())?;
let Some((path, _)) = first_in_path([OPENERS, BROWSER_OPENERS].concat(), env::split_paths(&path_var)) else { return Err("No opener found in PATH".to_string()) };
let Some((path, _)) = first_in_path(
[OPENERS, BROWSER_OPENERS].concat(),
env::split_paths(&path_var),
) else {
return Err("No opener found in PATH".to_string());
};
Self(path)
},
"macos" => Self(PathBuf::from("/usr/bin/open")),
Expand Down Expand Up @@ -75,6 +80,6 @@ where
I::IntoIter: Clone,
{
path.into_iter()
.cartesian_product(candidates.into_iter())
.cartesian_product(candidates)
.find(|(path, editor)| path.join(editor).exists())
}

0 comments on commit 3dad968

Please sign in to comment.