From 11b603cf07b6298cdec9803ef0b32085e43c335c Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 9 Sep 2023 12:05:48 -0700 Subject: [PATCH] Resolve rustdoc::redundant_explicit_links lint 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 | ~~~~~~~~~~~~~~~ --- src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 83f48a031..d2e5e0b62 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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};