Skip to content

Commit

Permalink
Appease Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Feb 14, 2025
1 parent 94279dd commit 4f917fe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3663,8 +3663,12 @@ impl Build {

/// Get a single-valued environment variable with target variants.
fn getenv_with_target_prefixes(&self, env: &str) -> Result<Arc<OsStr>, Error> {
let envs = self.target_envs(env)?;
let res = envs.iter().filter_map(|env| self.getenv(&env)).next();
// Take from first environment variable in the environment.
let res = self
.target_envs(env)?
.iter()
.filter_map(|env| self.getenv(env))
.next();

match res {
Some(res) => Ok(res),
Expand Down

0 comments on commit 4f917fe

Please sign in to comment.