Extends `self` with `path`. If `path` is absolute, it replaces the current path. On Windows: if `path` has a root but no prefix (e.g., `\windows`), it replaces everything except for the prefix (if any) of `self`. if `path` has a prefix but no root, it replaces `self`. if `self` has a verbatim prefix (e.g. `\\?\C:\windows`) and `path` is not empty, the new path is normalized: all references to `
(&mut self, path: P)
| 199 | /// assert_eq!(path, PathBuf::from("/etc")); |
| 200 | /// ``` |
| 201 | pub fn push<P: AsRef<Path>>(&mut self, path: P) { |
| 202 | self._push(path.as_ref()) |
| 203 | } |
| 204 | |
| 205 | fn _push(&mut self, path: &Path) { |
| 206 | // in general, a separator is needed if the rightmost byte is not a separator |
no test coverage detected