Skip to content

Commit 9ea1cbd

Browse files
committed
Fix doc warnings for cargo-util::paths
Add parentheses to disambiguate from `write!`. Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
1 parent 2daf97c commit 9ea1cbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/cargo-util/src/paths.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> Result<()>
161161
.with_context(|| format!("failed to write `{}`", path.display()))
162162
}
163163

164-
/// Equivalent to [`write`], but does not write anything if the file contents
164+
/// Equivalent to [`write()`], but does not write anything if the file contents
165165
/// are identical to the given contents.
166166
pub fn write_if_changed<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> Result<()> {
167167
(|| -> Result<()> {
@@ -184,7 +184,7 @@ pub fn write_if_changed<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) ->
184184
Ok(())
185185
}
186186

187-
/// Equivalent to [`write`], but appends to the end instead of replacing the
187+
/// Equivalent to [`write()`], but appends to the end instead of replacing the
188188
/// contents.
189189
pub fn append(path: &Path, contents: &[u8]) -> Result<()> {
190190
(|| -> Result<()> {

0 commit comments

Comments
 (0)