fix rustdoc lint warnings

This commit is contained in:
João M. Bezerra 2022-06-05 12:52:20 -03:00
parent e77930d2df
commit 2e165e57cb
2 changed files with 6 additions and 2 deletions

View File

@ -10,6 +10,9 @@ use clap::{Parser, ValueHint};
/// Repository: https://github.com/ouch-org/ouch
#[derive(Parser, Debug)]
#[clap(about, version)]
// Ignore bare urls in the documentation of this file because the doc comments
// are also being used by Clap's --help generation
#[allow(rustdoc::bare_urls)]
pub struct Opts {
/// Skip [Y/n] questions positively.
#[clap(short, long, conflicts_with = "no", global = true)]
@ -48,6 +51,7 @@ pub struct Opts {
// Clap commands:
// - `help`
#[derive(Parser, PartialEq, Eq, Debug)]
#[allow(rustdoc::bare_urls)]
pub enum Subcommand {
/// Compress one or more files into one output file.
#[clap(alias = "c")]

View File

@ -126,8 +126,8 @@ pub fn try_infer_extension(path: &Path) -> Option<Extension> {
}
/// Returns true if a path is a symlink.
/// This is the same as the nightly https://doc.rust-lang.org/std/path/struct.Path.html#method.is_symlink
// Useful to detect broken symlinks when compressing. (So we can safely ignore them)
/// This is the same as the nightly <https://doc.rust-lang.org/std/path/struct.Path.html#method.is_symlink>
/// Useful to detect broken symlinks when compressing. (So we can safely ignore them)
pub fn is_symlink(path: &Path) -> bool {
fs::symlink_metadata(path)
.map(|m| m.file_type().is_symlink())