Skip to content

Commit

Permalink
fix CI warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
joeydewaal committed Jun 18, 2024
1 parent b40cb67 commit 4d5b4b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 1 addition & 2 deletions axum-extra/src/extract/json_deserializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions axum-extra/src/routing/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4d5b4b8

Please sign in to comment.