Skip to content

Commit

Permalink
Remove redundant explicit link target in documentation (#88)
Browse files Browse the repository at this point in the history
When the CI tries to generate the documentation, it fails with

    error: redundant explicit link target
    Error:    --> dotenv/src/lib.rs:218:51
        |
    218 | /// Loads environment variables from [`io::Read`](std::io::Read).
        |                                       ----------  ^^^^^^^^^^^^^ explicit target is redundant
        |                                       |
        |                                       because label contains path that resolves to same destination
        |
        = note: when a link's destination is not specified,
                the label is used to resolve intra-doc links
        = note: `-D rustdoc::redundant-explicit-links` implied by `-D warnings`
        = help: to override `-D warnings` add `#[allow(rustdoc::redundant_explicit_links)]`
    help: remove explicit link target
        |
    218 | /// Loads environment variables from [`io::Read`].
        |                                      ~~~~~~~~~~~~

    error: redundant explicit link target

All instances of this redundant link target are fixed.
  • Loading branch information
striezel committed Jan 22, 2024
1 parent e38b6c4 commit 34b6955
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dotenv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ pub fn from_filename_iter<P: AsRef<Path>>(filename: P) -> Result<Iter<File>> {
Ok(iter)
}

/// Loads environment variables from [`io::Read`](std::io::Read).
/// Loads environment variables from [`io::Read`].
///
/// This is useful for loading environment variables from IPC or the network.
///
Expand Down Expand Up @@ -249,7 +249,7 @@ pub fn from_read<R: io::Read>(reader: R) -> Result<()> {
Ok(())
}

/// Loads environment variables from [`io::Read`](std::io::Read),
/// Loads environment variables from [`io::Read`],
/// overriding existing environment variables.
///
/// This is useful for loading environment variables from IPC or the network.
Expand Down Expand Up @@ -281,7 +281,7 @@ pub fn from_read_override<R: io::Read>(reader: R) -> Result<()> {
Ok(())
}

/// Returns an iterator over environment variables from [`io::Read`](std::io::Read).
/// Returns an iterator over environment variables from [`io::Read`].
///
/// # Examples
///
Expand Down

0 comments on commit 34b6955

Please sign in to comment.