diff --git a/src/docs/paths_from_format.txt b/src/docs/paths_from_format.txt index 746c3f859ab6..b965f19d0d46 100644 --- a/src/docs/paths_from_format.txt +++ b/src/docs/paths_from_format.txt @@ -5,7 +5,7 @@ Checks for `PathBuf::from(format!(..))` calls. It is not OS-agnostic, and can be harder to read. ### Known Problems -`.join()` introduces additional allocations that are not present when `Pathbuf::push` is +`.join()` introduces additional allocations that are not present when `PathBuf::push` is used instead. ### Example @@ -18,5 +18,5 @@ Use instead: ``` use std::path::Path; let base_path = "/base"; -Path::new(base_path).join("foo").join("bar"); +Path::new(&base_path).join("foo").join("bar"); ``` \ No newline at end of file