#126333 remove PathBuf::as_mut_vec reference at top of `PathBuf::_p… · model-checking/verify-rust-std@cfb8021 (original) (raw)

Original file line number Diff line number Diff line change
@@ -1290,7 +1290,8 @@ impl PathBuf {
1290 1290
1291 1291 fn _push(&mut self, path: &Path) {
1292 1292 // in general, a separator is needed if the rightmost byte is not a separator
1293 -let mut need_sep = self.as_mut_vec().last().map(|c
1293 +let buf = self.inner.as_encoded_bytes();
1294 +let mut need_sep = buf.last().map(|c
1294 1295
1295 1296 // in the special case of `C:` on Windows, do *not* add a separator
1296 1297 let comps = self.components();