docs: add link to Path::join in PathBuf::push

This commit is contained in:
Ezra Shaw
2022-12-30 14:24:12 +13:00
parent 270c94e484
commit 2c4ecffb77

View File

@@ -1246,6 +1246,9 @@ impl PathBuf {
/// and `path` is not empty, the new path is normalized: all references
/// to `.` and `..` are removed.
///
/// Consider using [`Path::join`] if you need a new `PathBuf` instead of
/// using this function on a cloned `PathBuf`.
///
/// # Examples
///
/// Pushing a relative path extends the existing path: