mirror of
https://github.com/ouch-org/ouch.git
synced 2025-07-21 09:00:15 +00:00
fix rustdoc lint warnings
This commit is contained in:
parent
e77930d2df
commit
2e165e57cb
@ -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")]
|
||||
|
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user