Skip to content

Commit

Permalink
Convert html links to intra-doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Feb 20, 2025
1 parent 1d7378e commit 13591f1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
7 changes: 2 additions & 5 deletions src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ where
/// - Deserializer::from_slice
/// - Deserializer::from_reader
///
/// [`File`]: https://doc.rust-lang.org/std/fs/struct.File.html
/// [`File`]: std::fs::File
pub fn new(read: R) -> Self {
Deserializer {
read,
Expand Down Expand Up @@ -2523,10 +2523,7 @@ where
/// reading a file completely into memory and then applying [`from_str`]
/// or [`from_slice`] on it. See [issue #160].
///
/// [`File`]: https://doc.rust-lang.org/std/fs/struct.File.html
/// [`std::io::BufReader`]: https://doc.rust-lang.org/std/io/struct.BufReader.html
/// [`from_str`]: ./fn.from_str.html
/// [`from_slice`]: ./fn.from_slice.html
/// [`File`]: std::fs::File
/// [issue #160]: https://github.com/serde-rs/json/issues/160
///
/// # Example
Expand Down
11 changes: 3 additions & 8 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
//! By default the map is backed by a [`BTreeMap`]. Enable the `preserve_order`
//! feature of serde_json to use [`IndexMap`] instead.
//!
//! [`BTreeMap`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html
//! [`IndexMap`]: https://docs.rs/indexmap/*/indexmap/map/struct.IndexMap.html
//! [`BTreeMap`]: std::collections::BTreeMap
//! [`IndexMap`]: indexmap::IndexMap
use crate::error::Error;
use crate::value::Value;
Expand Down Expand Up @@ -619,8 +619,7 @@ impl<'de> de::IntoDeserializer<'de, Error> for &'de Map<String, Value> {
/// A view into a single entry in a map, which may either be vacant or occupied.
/// This enum is constructed from the [`entry`] method on [`Map`].
///
/// [`entry`]: struct.Map.html#method.entry
/// [`Map`]: struct.Map.html
/// [`entry`]: Map::entry
pub enum Entry<'a> {
/// A vacant Entry.
Vacant(VacantEntry<'a>),
Expand All @@ -629,15 +628,11 @@ pub enum Entry<'a> {
}

/// A vacant Entry. It is part of the [`Entry`] enum.
///
/// [`Entry`]: enum.Entry.html
pub struct VacantEntry<'a> {
vacant: VacantEntryImpl<'a>,
}

/// An occupied Entry. It is part of the [`Entry`] enum.
///
/// [`Entry`]: enum.Entry.html
pub struct OccupiedEntry<'a> {
occupied: OccupiedEntryImpl<'a>,
}
Expand Down
6 changes: 3 additions & 3 deletions src/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ use serde::ser::{Serialize, SerializeStruct, Serializer};
/// the boxed form of `RawValue` instead. This is almost as efficient but
/// involves buffering the raw value from the I/O stream into memory.
///
/// [`serde_json::from_str`]: ../fn.from_str.html
/// [`serde_json::from_slice`]: ../fn.from_slice.html
/// [`serde_json::from_reader`]: ../fn.from_reader.html
/// [`serde_json::from_str`]: crate::from_str
/// [`serde_json::from_slice`]: crate::from_slice
/// [`serde_json::from_reader`]: crate::from_reader
///
/// ```
/// # use serde::Deserialize;
Expand Down
2 changes: 1 addition & 1 deletion src/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ where
/// as a [`File`], you will want to apply your own buffering because serde_json
/// will not buffer the input. See [`std::io::BufReader`].
///
/// [`File`]: https://doc.rust-lang.org/std/fs/struct.File.html
/// [`File`]: std::fs::File
pub fn new(reader: R) -> Self {
IoRead {
iter: LineColIterator::new(reader.bytes()),
Expand Down
6 changes: 3 additions & 3 deletions src/value/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use core::ops;
/// trait is implemented for strings which are used as the index into a JSON
/// map, and for `usize` which is used as the index into a JSON array.
///
/// [`get`]: ../enum.Value.html#method.get
/// [`get_mut`]: ../enum.Value.html#method.get_mut
/// [square-bracket indexing operator]: ../enum.Value.html#impl-Index%3CI%3E-for-Value
/// [`get`]: Value::get
/// [`get_mut`]: Value::get_mut
/// [square-bracket indexing operator]: Value#impl-Index%3CI%3E-for-Value
///
/// This trait is sealed and cannot be implemented for types outside of
/// `serde_json`.
Expand Down

0 comments on commit 13591f1

Please sign in to comment.