Fix clippy errors (#1423)

* Enclose Markdown links in brackets

The current clippy version (v0.1.78) says "you should put bare URLs
between `<`/`>` or make a proper Markdown link" and refers to
https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

* Enclose documentation item in backticks

Clippy v0.1.78 complains about the IPv6 network mask, insisting that it
is missing backticks. So backticks it gets.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

* Avoid error claiming `Add(usize)` is dead code

Clippy v0.1.78 identifies this as dead code. However, further down in
the same file, there is clearly a user:

  impl Handler<Result, Result> for Add {

This might be yet another incarnation of
https://github.com/rust-lang/rust/issues/56750

Let's just mark it as intentionally dead-code, even if this is untrue,
to make clippy happy again.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

---------

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2024-05-13 19:07:02 +02:00 committed by GitHub
parent 0a54079d01
commit 975901d470
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 6 additions and 5 deletions

View file

@ -429,7 +429,7 @@ Options:
[default: get]
-b, --base <BASE>
Base URL or website root directory to check relative URLs e.g. https://example.com or `/path/to/public`
Base URL or website root directory to check relative URLs e.g. <https://example.com> or `/path/to/public`
--basic-auth <BASIC_AUTH>
Basic authentication support. E.g. `http://example.com username:password`

View file

@ -350,7 +350,7 @@ separated list of accepted status codes. This example will accept 200, 201,
pub(crate) method: String,
/// Base URL or website root directory to check relative URLs
/// e.g. https://example.com or `/path/to/public`
/// e.g. <https://example.com> or `/path/to/public`
#[arg(short, long, value_parser= parse_base)]
#[serde(default)]
pub(crate) base: Option<Base>,

View file

@ -188,6 +188,7 @@ mod test {
};
use async_trait::async_trait;
#[allow(dead_code)] // work-around
#[derive(Debug)]
struct Add(usize);

View file

@ -269,7 +269,7 @@ pub struct ClientBuilder {
/// Cookie store used for requests.
///
/// See https://docs.rs/reqwest/latest/reqwest/struct.ClientBuilder.html#method.cookie_store
/// See <https://docs.rs/reqwest/latest/reqwest/struct.ClientBuilder.html#method.cookie_store>
cookie_jar: Option<Arc<CookieStoreMutex>>,
/// Enable the checking of fragments in links.

View file

@ -124,7 +124,7 @@ pub struct Filter {
/// Example: 169.254.0.0
pub exclude_link_local_ips: bool,
/// For IPv4: 127.0.0.1/8
/// For IPv6: ::1/128
/// For IPv6: `::1/128`
pub exclude_loopback_ips: bool,
/// Example: octocat@github.com
pub include_mail: bool,

View file

@ -36,7 +36,7 @@ pub enum Status {
Excluded,
/// The request type is currently not supported,
/// for example when the URL scheme is `slack://`.
/// See https://github.com/lycheeverse/lychee/issues/199
/// See <https://github.com/lycheeverse/lychee/issues/199>
Unsupported(ErrorKind),
/// Cached request status from previous run
Cached(CacheStatus),