Skip to content

Conversation

klutzy
Copy link
Contributor

@klutzy klutzy commented Apr 3, 2014

This fixes the easy parts of #12745.

if k == ~"PATH" { (~"PATH", v + ";" + lib_path + ";" + aux_path) }
else { (k,v) }
});
let new_pair = if k == ~"PATH" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be

let mut new_env = env.move_iter().map(|(k, v)| {
    let new_v = if "PATH" == k {
       format!("{};{};{}", *v, lib_path, aux_path)
   } else {
        v
   };
   (k, new_v)
}).collect();

instead of a manual loop? (It doesn't really matter particularly.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right. fixed!

@bors bors closed this in e7fe207 Apr 4, 2014
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this pull request Oct 11, 2022
Fix find_path using the wrong module for visibility calculations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants