Minor improvements to bootstrap#52729
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
|
@bors: r+ rollup Thanks! |
|
📌 Commit db303c1 has been approved by |
…hton Minor improvements to bootstrap - prefer `Path`-specific methods to `String` ones - don't add file extensions if they are removed right afterwards
|
@bors r- |
|
I investigated this and it appears that adding extensions with the But this... less so: In the second case I would either expect |
|
@ljedrz use std::path::{Path, PathBuf};
let path = Path::new("foo.rs");
assert_eq!(path.with_extension("txt"), PathBuf::from("foo.txt"));Therefore |
|
In that case it seems too risky to use it in case the path might contain any dots; the added value isn't too high, as it's just the bootstrap; I'll close the PR, then. |
Path-specific methods toStringones