Skip to content

Commit 13591f1

Browse files
committed
Convert html links to intra-doc links
1 parent 1d7378e commit 13591f1

File tree

5 files changed

+12
-20
lines changed

5 files changed

+12
-20
lines changed

src/de.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ where
5555
/// - Deserializer::from_slice
5656
/// - Deserializer::from_reader
5757
///
58-
/// [`File`]: https://doc.rust-lang.org/std/fs/struct.File.html
58+
/// [`File`]: std::fs::File
5959
pub fn new(read: R) -> Self {
6060
Deserializer {
6161
read,
@@ -2523,10 +2523,7 @@ where
25232523
/// reading a file completely into memory and then applying [`from_str`]
25242524
/// or [`from_slice`] on it. See [issue #160].
25252525
///
2526-
/// [`File`]: https://doc.rust-lang.org/std/fs/struct.File.html
2527-
/// [`std::io::BufReader`]: https://doc.rust-lang.org/std/io/struct.BufReader.html
2528-
/// [`from_str`]: ./fn.from_str.html
2529-
/// [`from_slice`]: ./fn.from_slice.html
2526+
/// [`File`]: std::fs::File
25302527
/// [issue #160]: https://github.com/serde-rs/json/issues/160
25312528
///
25322529
/// # Example

src/map.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
//! By default the map is backed by a [`BTreeMap`]. Enable the `preserve_order`
44
//! feature of serde_json to use [`IndexMap`] instead.
55
//!
6-
//! [`BTreeMap`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html
7-
//! [`IndexMap`]: https://docs.rs/indexmap/*/indexmap/map/struct.IndexMap.html
6+
//! [`BTreeMap`]: std::collections::BTreeMap
7+
//! [`IndexMap`]: indexmap::IndexMap
88
99
use crate::error::Error;
1010
use crate::value::Value;
@@ -619,8 +619,7 @@ impl<'de> de::IntoDeserializer<'de, Error> for &'de Map<String, Value> {
619619
/// A view into a single entry in a map, which may either be vacant or occupied.
620620
/// This enum is constructed from the [`entry`] method on [`Map`].
621621
///
622-
/// [`entry`]: struct.Map.html#method.entry
623-
/// [`Map`]: struct.Map.html
622+
/// [`entry`]: Map::entry
624623
pub enum Entry<'a> {
625624
/// A vacant Entry.
626625
Vacant(VacantEntry<'a>),
@@ -629,15 +628,11 @@ pub enum Entry<'a> {
629628
}
630629

631630
/// A vacant Entry. It is part of the [`Entry`] enum.
632-
///
633-
/// [`Entry`]: enum.Entry.html
634631
pub struct VacantEntry<'a> {
635632
vacant: VacantEntryImpl<'a>,
636633
}
637634

638635
/// An occupied Entry. It is part of the [`Entry`] enum.
639-
///
640-
/// [`Entry`]: enum.Entry.html
641636
pub struct OccupiedEntry<'a> {
642637
occupied: OccupiedEntryImpl<'a>,
643638
}

src/raw.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ use serde::ser::{Serialize, SerializeStruct, Serializer};
9999
/// the boxed form of `RawValue` instead. This is almost as efficient but
100100
/// involves buffering the raw value from the I/O stream into memory.
101101
///
102-
/// [`serde_json::from_str`]: ../fn.from_str.html
103-
/// [`serde_json::from_slice`]: ../fn.from_slice.html
104-
/// [`serde_json::from_reader`]: ../fn.from_reader.html
102+
/// [`serde_json::from_str`]: crate::from_str
103+
/// [`serde_json::from_slice`]: crate::from_slice
104+
/// [`serde_json::from_reader`]: crate::from_reader
105105
///
106106
/// ```
107107
/// # use serde::Deserialize;

src/read.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ where
196196
/// as a [`File`], you will want to apply your own buffering because serde_json
197197
/// will not buffer the input. See [`std::io::BufReader`].
198198
///
199-
/// [`File`]: https://doc.rust-lang.org/std/fs/struct.File.html
199+
/// [`File`]: std::fs::File
200200
pub fn new(reader: R) -> Self {
201201
IoRead {
202202
iter: LineColIterator::new(reader.bytes()),

src/value/index.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ use core::ops;
1212
/// trait is implemented for strings which are used as the index into a JSON
1313
/// map, and for `usize` which is used as the index into a JSON array.
1414
///
15-
/// [`get`]: ../enum.Value.html#method.get
16-
/// [`get_mut`]: ../enum.Value.html#method.get_mut
17-
/// [square-bracket indexing operator]: ../enum.Value.html#impl-Index%3CI%3E-for-Value
15+
/// [`get`]: Value::get
16+
/// [`get_mut`]: Value::get_mut
17+
/// [square-bracket indexing operator]: Value#impl-Index%3CI%3E-for-Value
1818
///
1919
/// This trait is sealed and cannot be implemented for types outside of
2020
/// `serde_json`.

0 commit comments

Comments
 (0)