From 4d5b4b8732deeaa2dae8723e060d68c259a5c565 Mon Sep 17 00:00:00 2001 From: Joey de Waal Date: Tue, 18 Jun 2024 20:15:51 +0200 Subject: [PATCH] fix CI warnings --- axum-extra/src/extract/json_deserializer.rs | 3 +-- axum-extra/src/routing/typed.rs | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/axum-extra/src/extract/json_deserializer.rs b/axum-extra/src/extract/json_deserializer.rs index b138c50f3a..03f1a41911 100644 --- a/axum-extra/src/extract/json_deserializer.rs +++ b/axum-extra/src/extract/json_deserializer.rs @@ -23,8 +23,7 @@ use std::marker::PhantomData; /// Additionally, a `JsonRejection` error will be returned, when calling `deserialize` if: /// /// - The body doesn't contain syntactically valid JSON. -/// - The body contains syntactically valid JSON, but it couldn't be deserialized into the target -/// type. +/// - The body contains syntactically valid JSON, but it couldn't be deserialized into the target type. /// - Attempting to deserialize escaped JSON into a type that must be borrowed (e.g. `&'a str`). /// /// ⚠️ `serde` will implicitly try to borrow for `&str` and `&[u8]` types, but will error if the diff --git a/axum-extra/src/routing/typed.rs b/axum-extra/src/routing/typed.rs index f754282369..0a4e8d3d64 100644 --- a/axum-extra/src/routing/typed.rs +++ b/axum-extra/src/routing/typed.rs @@ -84,13 +84,9 @@ use serde::Serialize; /// The macro expands to: /// /// - A `TypedPath` implementation. -/// - A [`FromRequest`] implementation compatible with [`RouterExt::typed_get`], -/// [`RouterExt::typed_post`], etc. This implementation uses [`Path`] and thus your struct must -/// also implement [`serde::Deserialize`], unless it's a unit struct. +/// - A [`FromRequest`] implementation compatible with [`RouterExt::typed_get`], [`RouterExt::typed_post`], etc. This implementation uses [`Path`] and thus your struct must also implement [`serde::Deserialize`], unless it's a unit struct. /// - A [`Display`] implementation that interpolates the captures. This can be used to, among other -/// things, create links to known paths and have them verified statically. Note that the -/// [`Display`] implementation for each field must return something that's compatible with its -/// [`Deserialize`] implementation. +/// things, create links to known paths and have them verified statically. Note that the [`Display`] implementation for each field must return something that's compatible with its [`Deserialize`] implementation. /// /// Additionally the macro will verify the captures in the path matches the fields of the struct. /// For example this fails to compile since the struct doesn't have a `team_id` field: