mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Apply suggested changes
This commit is contained in:
parent
29e5cdfb05
commit
23a5f31ff4
18 changed files with 1878 additions and 299 deletions
|
@ -135,6 +135,24 @@ impl AbsPathBuf {
|
|||
pub fn pop(&mut self) -> bool {
|
||||
self.0.pop()
|
||||
}
|
||||
|
||||
/// Equivalent of [`PathBuf::push`] for `AbsPathBuf`.
|
||||
///
|
||||
/// 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 `.` and `..` are removed.
|
||||
pub fn push(&mut self, suffix: &str) {
|
||||
self.0.push(suffix)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for AbsPathBuf {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue