From 0778d787ccb42cdeb41fcea9007248849a5565b4 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 19 Jul 2020 14:32:17 +0200 Subject: [PATCH] Add references to the filesystem function wrappers --- tools/yabridgectl/src/utils.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/yabridgectl/src/utils.rs b/tools/yabridgectl/src/utils.rs index ba35bb5a..95219b10 100644 --- a/tools/yabridgectl/src/utils.rs +++ b/tools/yabridgectl/src/utils.rs @@ -26,7 +26,7 @@ use std::path::Path; use std::process::{Command, Stdio}; use textwrap::Wrapper; -/// Wrapper around `std::fs::copy` with a human readable error message. +/// Wrapper around [`std::fs::copy()`](std::fs::copy) with a human readable error message. pub fn copy, Q: AsRef>(from: P, to: Q) -> Result { fs::copy(&from, &to).with_context(|| { format!( @@ -37,13 +37,15 @@ pub fn copy, Q: AsRef>(from: P, to: Q) -> Result { }) } -/// Wrapper around `std::fs::remove_file` with a human readable error message. +/// Wrapper around [`std::fs::remove_file()`](std::fs::remove_file) with a human readable error +/// message. pub fn remove_file>(path: P) -> Result<()> { fs::remove_file(&path) .with_context(|| format!("Could not remove '{}'", path.as_ref().display())) } -/// Wrapper around `std::os::unix::fs::symlink` with a human readable error message. +/// Wrapper around [`std::os::unix::fs::symlink()`](std::os::unix::fs::symlink) with a human +/// readable error message. pub fn symlink, Q: AsRef>(src: P, dst: Q) -> Result<()> { unix_fs::symlink(&src, &dst).with_context(|| { format!(