From 33b353def85b9dffec1b615af8323b8e1d9111ec Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Fri, 27 Dec 2024 13:15:58 +0100 Subject: [PATCH] Update docs.rs links to 0.8 (#3120) --- axum-core/src/extract/default_body_limit.rs | 12 ++++++------ axum-core/src/extract/from_ref.rs | 2 +- axum-core/src/extract/mod.rs | 10 +++++----- axum-core/src/extract/request_parts.rs | 2 +- axum-core/src/response/mod.rs | 2 +- axum-macros/src/lib.rs | 16 ++++++++-------- .../fail/argument_not_extractor.stderr | 2 +- .../fail/parts_extracting_body.stderr | 2 +- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/axum-core/src/extract/default_body_limit.rs b/axum-core/src/extract/default_body_limit.rs index a045d1cd..3eae3753 100644 --- a/axum-core/src/extract/default_body_limit.rs +++ b/axum-core/src/extract/default_body_limit.rs @@ -66,8 +66,8 @@ use tower_layer::Layer; /// /// [`Body::poll_frame`]: http_body::Body::poll_frame /// [`Bytes`]: bytes::Bytes -/// [`Json`]: https://docs.rs/axum/0.7/axum/struct.Json.html -/// [`Form`]: https://docs.rs/axum/0.7/axum/struct.Form.html +/// [`Json`]: https://docs.rs/axum/0.8/axum/struct.Json.html +/// [`Form`]: https://docs.rs/axum/0.8/axum/struct.Form.html /// [`FromRequest`]: crate::extract::FromRequest /// [`RequestBodyLimit`]: tower_http::limit::RequestBodyLimit /// [`RequestExt::with_limited_body`]: crate::RequestExt::with_limited_body @@ -114,8 +114,8 @@ impl DefaultBodyLimit { /// ``` /// /// [`Bytes`]: bytes::Bytes - /// [`Json`]: https://docs.rs/axum/0.7/axum/struct.Json.html - /// [`Form`]: https://docs.rs/axum/0.7/axum/struct.Form.html + /// [`Json`]: https://docs.rs/axum/0.8/axum/struct.Json.html + /// [`Form`]: https://docs.rs/axum/0.8/axum/struct.Form.html pub const fn disable() -> Self { Self { kind: DefaultBodyLimitKind::Disable, @@ -147,8 +147,8 @@ impl DefaultBodyLimit { /// ``` /// /// [`Bytes::from_request`]: bytes::Bytes - /// [`Json`]: https://docs.rs/axum/0.7/axum/struct.Json.html - /// [`Form`]: https://docs.rs/axum/0.7/axum/struct.Form.html + /// [`Json`]: https://docs.rs/axum/0.8/axum/struct.Json.html + /// [`Form`]: https://docs.rs/axum/0.8/axum/struct.Form.html pub const fn max(limit: usize) -> Self { Self { kind: DefaultBodyLimitKind::Limit(limit), diff --git a/axum-core/src/extract/from_ref.rs b/axum-core/src/extract/from_ref.rs index c224303c..d38d121c 100644 --- a/axum-core/src/extract/from_ref.rs +++ b/axum-core/src/extract/from_ref.rs @@ -7,7 +7,7 @@ /// /// This trait can be derived using `#[derive(FromRef)]`. /// -/// [`State`]: https://docs.rs/axum/0.7/axum/extract/struct.State.html +/// [`State`]: https://docs.rs/axum/0.8/axum/extract/struct.State.html // NOTE: This trait is defined in axum-core, even though it is mainly used with `State` which is // defined in axum. That allows crate authors to use it when implementing extractors. pub trait FromRef { diff --git a/axum-core/src/extract/mod.rs b/axum-core/src/extract/mod.rs index 761ea7fc..45002f75 100644 --- a/axum-core/src/extract/mod.rs +++ b/axum-core/src/extract/mod.rs @@ -2,7 +2,7 @@ //! //! See [`axum::extract`] for more details. //! -//! [`axum::extract`]: https://docs.rs/axum/0.7/axum/extract/index.html +//! [`axum::extract`]: https://docs.rs/axum/0.8/axum/extract/index.html use crate::{body::Body, response::IntoResponse}; use http::request::Parts; @@ -46,11 +46,11 @@ mod private { /// /// See [`axum::extract`] for more general docs about extractors. /// -/// [`axum::extract`]: https://docs.rs/axum/0.7/axum/extract/index.html +/// [`axum::extract`]: https://docs.rs/axum/0.8/axum/extract/index.html #[rustversion::attr( since(1.78), diagnostic::on_unimplemented( - note = "Function argument is not a valid axum extractor. \nSee `https://docs.rs/axum/0.7/axum/extract/index.html` for details", + note = "Function argument is not a valid axum extractor. \nSee `https://docs.rs/axum/0.8/axum/extract/index.html` for details", ) )] pub trait FromRequestParts: Sized { @@ -75,11 +75,11 @@ pub trait FromRequestParts: Sized { /// /// See [`axum::extract`] for more general docs about extractors. /// -/// [`axum::extract`]: https://docs.rs/axum/0.7/axum/extract/index.html +/// [`axum::extract`]: https://docs.rs/axum/0.8/axum/extract/index.html #[rustversion::attr( since(1.78), diagnostic::on_unimplemented( - note = "Function argument is not a valid axum extractor. \nSee `https://docs.rs/axum/0.7/axum/extract/index.html` for details", + note = "Function argument is not a valid axum extractor. \nSee `https://docs.rs/axum/0.8/axum/extract/index.html` for details", ) )] pub trait FromRequest: Sized { diff --git a/axum-core/src/extract/request_parts.rs b/axum-core/src/extract/request_parts.rs index 695f7e1e..70fc021a 100644 --- a/axum-core/src/extract/request_parts.rs +++ b/axum-core/src/extract/request_parts.rs @@ -53,7 +53,7 @@ where /// /// Prefer using [`TypedHeader`] to extract only the headers you need. /// -/// [`TypedHeader`]: https://docs.rs/axum/0.7/axum/extract/struct.TypedHeader.html +/// [`TypedHeader`]: https://docs.rs/axum/0.8/axum/extract/struct.TypedHeader.html impl FromRequestParts for HeaderMap where S: Send + Sync, diff --git a/axum-core/src/response/mod.rs b/axum-core/src/response/mod.rs index dd6728b1..b40b2529 100644 --- a/axum-core/src/response/mod.rs +++ b/axum-core/src/response/mod.rs @@ -2,7 +2,7 @@ //! //! See [`axum::response`] for more details. //! -//! [`axum::response`]: https://docs.rs/axum/0.7/axum/response/index.html +//! [`axum::response`]: https://docs.rs/axum/0.8/axum/response/index.html use crate::body::Body; diff --git a/axum-macros/src/lib.rs b/axum-macros/src/lib.rs index 86b2c1c2..c1b372ec 100644 --- a/axum-macros/src/lib.rs +++ b/axum-macros/src/lib.rs @@ -369,9 +369,9 @@ use from_request::Trait::{FromRequest, FromRequestParts}; /// } /// ``` /// -/// [`FromRequest`]: https://docs.rs/axum/0.7/axum/extract/trait.FromRequest.html -/// [`axum::response::Response`]: https://docs.rs/axum/0.7/axum/response/type.Response.html -/// [`axum::extract::rejection::ExtensionRejection`]: https://docs.rs/axum/0.7/axum/extract/rejection/enum.ExtensionRejection.html +/// [`FromRequest`]: https://docs.rs/axum/0.8/axum/extract/trait.FromRequest.html +/// [`axum::response::Response`]: https://docs.rs/axum/0.8/axum/response/type.Response.html +/// [`axum::extract::rejection::ExtensionRejection`]: https://docs.rs/axum/0.8/axum/extract/rejection/enum.ExtensionRejection.html #[proc_macro_derive(FromRequest, attributes(from_request))] pub fn derive_from_request(item: TokenStream) -> TokenStream { expand_with(item, |item| from_request::expand(item, FromRequest)) @@ -420,7 +420,7 @@ pub fn derive_from_request(item: TokenStream) -> TokenStream { /// /// Use `#[derive(FromRequest)]` for that. /// -/// [`FromRequestParts`]: https://docs.rs/axum/0.7/axum/extract/trait.FromRequestParts.html +/// [`FromRequestParts`]: https://docs.rs/axum/0.8/axum/extract/trait.FromRequestParts.html #[proc_macro_derive(FromRequestParts, attributes(from_request))] pub fn derive_from_request_parts(item: TokenStream) -> TokenStream { expand_with(item, |item| from_request::expand(item, FromRequestParts)) @@ -569,8 +569,8 @@ pub fn derive_from_request_parts(item: TokenStream) -> TokenStream { /// This macro has no effect when compiled with the release profile. (eg. `cargo build --release`) /// /// [`axum`]: https://docs.rs/axum/0.7 -/// [`Handler`]: https://docs.rs/axum/0.7/axum/handler/trait.Handler.html -/// [`axum::extract::State`]: https://docs.rs/axum/0.7/axum/extract/struct.State.html +/// [`Handler`]: https://docs.rs/axum/0.8/axum/handler/trait.Handler.html +/// [`axum::extract::State`]: https://docs.rs/axum/0.8/axum/extract/struct.State.html /// [`debug_handler`]: macro@debug_handler #[proc_macro_attribute] pub fn debug_handler(_attr: TokenStream, input: TokenStream) -> TokenStream { @@ -626,7 +626,7 @@ pub fn debug_handler(_attr: TokenStream, input: TokenStream) -> TokenStream { /// This macro has no effect when compiled with the release profile. (eg. `cargo build --release`) /// /// [`axum`]: https://docs.rs/axum/latest -/// [`axum::middleware::from_fn`]: https://docs.rs/axum/0.7/axum/middleware/fn.from_fn.html +/// [`axum::middleware::from_fn`]: https://docs.rs/axum/0.8/axum/middleware/fn.from_fn.html /// [`debug_middleware`]: macro@debug_middleware #[proc_macro_attribute] pub fn debug_middleware(_attr: TokenStream, input: TokenStream) -> TokenStream { @@ -709,7 +709,7 @@ pub fn derive_typed_path(input: TokenStream) -> TokenStream { /// # let _: axum::Router = app; /// ``` /// -/// [`FromRef`]: https://docs.rs/axum/0.7/axum/extract/trait.FromRef.html +/// [`FromRef`]: https://docs.rs/axum/0.8/axum/extract/trait.FromRef.html #[proc_macro_derive(FromRef, attributes(from_ref))] pub fn derive_from_ref(item: TokenStream) -> TokenStream { expand_with(item, from_ref::expand) diff --git a/axum-macros/tests/debug_handler/fail/argument_not_extractor.stderr b/axum-macros/tests/debug_handler/fail/argument_not_extractor.stderr index f5687df0..56a4fff5 100644 --- a/axum-macros/tests/debug_handler/fail/argument_not_extractor.stderr +++ b/axum-macros/tests/debug_handler/fail/argument_not_extractor.stderr @@ -5,7 +5,7 @@ error[E0277]: the trait bound `bool: FromRequest<(), axum_core::extract::private | ^^^^ the trait `FromRequestParts<()>` is not implemented for `bool`, which is required by `bool: FromRequest<(), _>` | = note: Function argument is not a valid axum extractor. - See `https://docs.rs/axum/0.7/axum/extract/index.html` for details + See `https://docs.rs/axum/0.8/axum/extract/index.html` for details = help: the following other types implement trait `FromRequestParts`: `()` implements `FromRequestParts` `(T1, T2)` implements `FromRequestParts` diff --git a/axum-macros/tests/from_request/fail/parts_extracting_body.stderr b/axum-macros/tests/from_request/fail/parts_extracting_body.stderr index d2401803..3008270f 100644 --- a/axum-macros/tests/from_request/fail/parts_extracting_body.stderr +++ b/axum-macros/tests/from_request/fail/parts_extracting_body.stderr @@ -5,7 +5,7 @@ error[E0277]: the trait bound `String: FromRequestParts<_>` is not satisfied | ^^^^^^ the trait `FromRequestParts<_>` is not implemented for `String` | = note: Function argument is not a valid axum extractor. - See `https://docs.rs/axum/0.7/axum/extract/index.html` for details + See `https://docs.rs/axum/0.8/axum/extract/index.html` for details = help: the following other types implement trait `FromRequestParts`: `()` implements `FromRequestParts` `(T1, T2)` implements `FromRequestParts`