mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
#126333 remove PathBuf::as_mut_vec
reference at top of PathBuf::_push
This commit is contained in:
parent
c2d2bb38c9
commit
2155c6c477
@ -1290,7 +1290,8 @@ impl PathBuf {
|
||||
|
||||
fn _push(&mut self, path: &Path) {
|
||||
// in general, a separator is needed if the rightmost byte is not a separator
|
||||
let mut need_sep = self.as_mut_vec().last().map(|c| !is_sep_byte(*c)).unwrap_or(false);
|
||||
let buf = self.inner.as_encoded_bytes();
|
||||
let mut need_sep = buf.last().map(|c| !is_sep_byte(*c)).unwrap_or(false);
|
||||
|
||||
// in the special case of `C:` on Windows, do *not* add a separator
|
||||
let comps = self.components();
|
||||
|
Loading…
Reference in New Issue
Block a user