Skip to content

Commit

Permalink
Resolve rustdoc::redundant_explicit_links lint
Browse files Browse the repository at this point in the history
    warning: redundant explicit link target
       --> src/lib.rs:59:20
        |
    59  | //! [`from_slice`][from_slice] for parsing from a byte slice &[u8] and
        |      ------------  ^^^^^^^^^^ explicit target is redundant
        |      |
        |      because label contains path that resolves to same destination
        |
    note: referenced explicit link target defined here
       --> src/lib.rs:295:19
        |
    295 | //! [from_slice]: crate::de::from_slice
        |                   ^^^^^^^^^^^^^^^^^^^^^
        = note: when a link's destination is not specified,
                the label is used to resolve intra-doc links
        = note: `#[warn(rustdoc::redundant_explicit_links)]` on by default
    help: remove explicit link target
        |
    59  | //! [`from_slice`] for parsing from a byte slice &[u8] and
        |     ~~~~~~~~~~~~~~

    warning: redundant explicit link target
       --> src/lib.rs:60:21
        |
    60  | //! [`from_reader`][from_reader] for parsing from any `io::Read` like a File or
        |      -------------  ^^^^^^^^^^^ explicit target is redundant
        |      |
        |      because label contains path that resolves to same destination
        |
    note: referenced explicit link target defined here
       --> src/lib.rs:296:20
        |
    296 | //! [from_reader]: crate::de::from_reader
        |                    ^^^^^^^^^^^^^^^^^^^^^^
        = note: when a link's destination is not specified,
                the label is used to resolve intra-doc links
    help: remove explicit link target
        |
    60  | //! [`from_reader`] for parsing from any `io::Read` like a File or
        |     ~~~~~~~~~~~~~~~
  • Loading branch information
dtolnay committed Sep 9, 2023
1 parent 95c5d6c commit 11b603c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@
//! ```
//!
//! A string of JSON data can be parsed into a `serde_json::Value` by the
//! [`serde_json::from_str`][from_str] function. There is also
//! [`from_slice`][from_slice] for parsing from a byte slice &[u8] and
//! [`from_reader`][from_reader] for parsing from any `io::Read` like a File or
//! a TCP stream.
//! [`serde_json::from_str`][from_str] function. There is also [`from_slice`]
//! for parsing from a byte slice &[u8] and [`from_reader`] for parsing from any
//! `io::Read` like a File or a TCP stream.
//!
//! ```
//! use serde_json::{Result, Value};
Expand Down

0 comments on commit 11b603c

Please sign in to comment.