Closed
Description
Reading both https://doc.rust-lang.org/std/env/struct.SplitPaths.html and https://doc.rust-lang.org/std/env/fn.split_paths.html there's no specification that the Item
type for the iterator is PathBuf
. To me it seemed ambiguous what an "iterator that splits an environment variable into paths" or "an iterator over the paths" returns since it could be the string representing the paths -- which is OsStr
-- or an actual Path
object.
I'm happy to submit a PR if this is makes sense enough to fix (since according #30093 it used to specify this detail and now it doesn't with a quick perusal of https://github.com/rust-lang/rust/blame/master/src/libstd/env.rs not turning up anything obvious as to why the change).