From ef5a0de38430e8cd5aa9871c6bb8ddfabf30f611 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 18 Dec 2022 11:45:23 -0800 Subject: [PATCH 1/2] Point documentation links to docs.rs instead of docs.serde.rs --- README.md | 2 +- crates-io.md | 2 +- serde/Cargo.toml | 2 +- serde_test/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 07453ac1e..c3f6575ef 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ You may be looking for: - [Data formats supported by Serde](https://serde.rs/#data-formats) - [Setting up `#[derive(Serialize, Deserialize)]`](https://serde.rs/derive.html) - [Examples](https://serde.rs/examples.html) -- [API documentation](https://docs.serde.rs/serde/) +- [API documentation](https://docs.rs/serde) - [Release notes](https://github.com/serde-rs/serde/releases) ## Serde in action diff --git a/crates-io.md b/crates-io.md index b57bc5fd0..6e0ec280c 100644 --- a/crates-io.md +++ b/crates-io.md @@ -10,7 +10,7 @@ You may be looking for: - [Data formats supported by Serde](https://serde.rs/#data-formats) - [Setting up `#[derive(Serialize, Deserialize)]`](https://serde.rs/derive.html) - [Examples](https://serde.rs/examples.html) -- [API documentation](https://docs.serde.rs/serde/) +- [API documentation](https://docs.rs/serde) - [Release notes](https://github.com/serde-rs/serde/releases) ## Serde in action diff --git a/serde/Cargo.toml b/serde/Cargo.toml index e720eaea5..76d6b5ac7 100644 --- a/serde/Cargo.toml +++ b/serde/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Erick Tryzelaar ", "David Tolnay ", "David Tolnay Date: Sun, 18 Dec 2022 11:47:31 -0800 Subject: [PATCH 2/2] Replace docs.serde.rs links with intra-rustdoc links --- serde/src/de/mod.rs | 5 ++--- serde/src/ser/mod.rs | 5 ++--- serde_test/src/lib.rs | 10 +++------- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/serde/src/de/mod.rs b/serde/src/de/mod.rs index d9dafbe1e..ca29ec610 100644 --- a/serde/src/de/mod.rs +++ b/serde/src/de/mod.rs @@ -501,8 +501,8 @@ impl<'a> Display for Expected + 'a { /// by Serde. /// /// Serde provides `Deserialize` implementations for many Rust primitive and -/// standard library types. The complete list is [here][de]. All of these can -/// be deserialized using Serde out of the box. +/// standard library types. The complete list is [here][crate::de]. All of these +/// can be deserialized using Serde out of the box. /// /// Additionally, Serde provides a procedural macro called `serde_derive` to /// automatically generate `Deserialize` implementations for structs and enums @@ -518,7 +518,6 @@ impl<'a> Display for Expected + 'a { /// `LinkedHashMap` type that is deserializable by Serde because the crate /// provides an implementation of `Deserialize` for it. /// -/// [de]: https://docs.serde.rs/serde/de/index.html /// [derive]: https://serde.rs/derive.html /// [impl-deserialize]: https://serde.rs/impl-deserialize.html /// diff --git a/serde/src/ser/mod.rs b/serde/src/ser/mod.rs index f44d90633..5c45426e8 100644 --- a/serde/src/ser/mod.rs +++ b/serde/src/ser/mod.rs @@ -194,8 +194,8 @@ declare_error_trait!(Error: Sized + Debug + Display); /// by Serde. /// /// Serde provides `Serialize` implementations for many Rust primitive and -/// standard library types. The complete list is [here][ser]. All of these can -/// be serialized using Serde out of the box. +/// standard library types. The complete list is [here][crate::ser]. All of +/// these can be serialized using Serde out of the box. /// /// Additionally, Serde provides a procedural macro called [`serde_derive`] to /// automatically generate `Serialize` implementations for structs and enums in @@ -215,7 +215,6 @@ declare_error_trait!(Error: Sized + Debug + Display); /// [`linked-hash-map`]: https://crates.io/crates/linked-hash-map /// [`serde_derive`]: https://crates.io/crates/serde_derive /// [derive section of the manual]: https://serde.rs/derive.html -/// [ser]: https://docs.serde.rs/serde/ser/index.html pub trait Serialize { /// Serialize this value into the given Serde serializer. /// diff --git a/serde_test/src/lib.rs b/serde_test/src/lib.rs index 106b3546c..4818c3ad5 100644 --- a/serde_test/src/lib.rs +++ b/serde_test/src/lib.rs @@ -1,8 +1,8 @@ //! This crate provides a convenient concise way to write unit tests for //! implementations of [`Serialize`] and [`Deserialize`]. //! -//! [`Serialize`]: https://docs.serde.rs/serde/ser/trait.Serialize.html -//! [`Deserialize`]: https://docs.serde.rs/serde/de/trait.Deserialize.html +//! [`Serialize`]: serde::ser::Serialize +//! [`Deserialize`]: serde::de::Deserialize //! //! The `Serialize` impl for a value can be characterized by the sequence of //! [`Serializer`] calls that are made in the course of serializing the value, @@ -14,11 +14,7 @@ //! test both directions. There are also functions to test expected failure //! conditions. //! -//! [`Serializer`]: https://docs.serde.rs/serde/ser/trait.Serializer.html -//! [`Token`]: https://docs.serde.rs/serde_test/enum.Token.html -//! [`assert_ser_tokens`]: https://docs.serde.rs/serde_test/fn.assert_ser_tokens.html -//! [`assert_de_tokens`]: https://docs.serde.rs/serde_test/fn.assert_de_tokens.html -//! [`assert_tokens`]: https://docs.serde.rs/serde_test/fn.assert_tokens.html +//! [`Serializer`]: serde::ser::Serializer //! //! Here is an example from the [`linked-hash-map`] crate. //!