8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PathBuf::as_mut_vec
PathBuf::_push
1 parent a451b2a commit cfb8021Copy full SHA for cfb8021
std/src/path.rs
@@ -1290,7 +1290,8 @@ impl PathBuf {
1290
1291
fn _push(&mut self, path: &Path) {
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| !is_sep_byte(*c)).unwrap_or(false);
+ let buf = self.inner.as_encoded_bytes();
1294
+ let mut need_sep = buf.last().map(|c| !is_sep_byte(*c)).unwrap_or(false);
1295
1296
// in the special case of `C:` on Windows, do *not* add a separator
1297
let comps = self.components();
0 commit comments