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 /// Repository: https://github.com/ouch-org/ouch
#[derive(Parser, Debug)] #[derive(Parser, Debug)]
#[clap(about, version)] #[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 { pub struct Opts {
/// Skip [Y/n] questions positively. /// Skip [Y/n] questions positively.
#[clap(short, long, conflicts_with = "no", global = true)] #[clap(short, long, conflicts_with = "no", global = true)]
@ -48,6 +51,7 @@ pub struct Opts {
// Clap commands: // Clap commands:
// - `help` // - `help`
#[derive(Parser, PartialEq, Eq, Debug)] #[derive(Parser, PartialEq, Eq, Debug)]
#[allow(rustdoc::bare_urls)]
pub enum Subcommand { pub enum Subcommand {
/// Compress one or more files into one output file. /// Compress one or more files into one output file.
#[clap(alias = "c")] #[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. /// 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 /// 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) /// Useful to detect broken symlinks when compressing. (So we can safely ignore them)
pub fn is_symlink(path: &Path) -> bool { pub fn is_symlink(path: &Path) -> bool {
fs::symlink_metadata(path) fs::symlink_metadata(path)
.map(|m| m.file_type().is_symlink()) .map(|m| m.file_type().is_symlink())