| @@ -1305,7 +1305,7 @@ impl PathBuf { |
|
|
| 1305 |
1305 |
|
| 1306 |
1306 |
// absolute `path` replaces `self` |
| 1307 |
1307 |
if path.is_absolute() | |
| 1308 |
|
-self.as_mut_vec().truncate(0); |
|
1308 |
+self.inner.truncate(0); |
| 1309 |
1309 |
|
| 1310 |
1310 |
// verbatim paths need . and .. removed |
| 1311 |
1311 |
} else if comps.prefix_verbatim() && !path.inner.is_empty() { |
| @@ -1350,7 +1350,7 @@ impl PathBuf { |
|
|
| 1350 |
1350 |
// `path` has a root but no prefix, e.g., `\windows` (Windows only) |
| 1351 |
1351 |
} else if path.has_root() { |
| 1352 |
1352 |
let prefix_len = self.components().prefix_remaining(); |
| 1353 |
|
-self.as_mut_vec().truncate(prefix_len); |
|
1353 |
+self.inner.truncate(prefix_len); |
| 1354 |
1354 |
|
| 1355 |
1355 |
// `path` is a pure relative path |
| 1356 |
1356 |
} else if need_sep { |
| @@ -1383,7 +1383,7 @@ impl PathBuf { |
|
|
| 1383 |
1383 |
pub fn pop(&mut self) -> bool { |
| 1384 |
1384 |
match self.parent().map(|p |
| 1385 |
1385 |
Some(len) => { |
| 1386 |
|
-self.as_mut_vec().truncate(len); |
|
1386 |
+self.inner.truncate(len); |
| 1387 |
1387 |
true |
| 1388 |
1388 |
} |
| 1389 |
1389 |
None => false, |