From fcf8796b4bdce226fab7a868458cf3af232d168c Mon Sep 17 00:00:00 2001 From: David Pedersen Date: Mon, 14 Feb 2022 15:06:39 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Jonas Platte --- axum-extra/src/routing/typed.rs | 4 ++-- axum-macros/src/typed_path.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/axum-extra/src/routing/typed.rs b/axum-extra/src/routing/typed.rs index 9478e71c..81d980d3 100644 --- a/axum-extra/src/routing/typed.rs +++ b/axum-extra/src/routing/typed.rs @@ -64,7 +64,7 @@ use super::sealed::Sealed; /// /// # Using `#[derive(TypedPath)]` /// -/// While `TypedPath` can be implemented manually its _highly_ recommended to derive it: +/// While `TypedPath` can be implemented manually, it's _highly_ recommended to derive it: /// /// ``` /// use serde::Deserialize; @@ -84,7 +84,7 @@ use super::sealed::Sealed; /// things, create links to known paths and have them verified statically. /// - 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 its a unit struct. +/// also implement [`serde::Deserialize`], unless it's a unit struct. /// /// 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: diff --git a/axum-macros/src/typed_path.rs b/axum-macros/src/typed_path.rs index f4f15529..3416efff 100644 --- a/axum-macros/src/typed_path.rs +++ b/axum-macros/src/typed_path.rs @@ -14,7 +14,7 @@ pub(crate) fn expand(item_struct: ItemStruct) -> syn::Result { if !generics.params.is_empty() || generics.where_clause.is_some() { return Err(syn::Error::new_spanned( generics, - "`#[derive(TypePath)]` doesn't support generics", + "`#[derive(TypedPath)]` doesn't support generics", )); }