From f9ba7776d90d2d4c29d495a40d2c077ae253fbaa Mon Sep 17 00:00:00 2001 From: co63oc Date: Fri, 28 Feb 2025 08:26:18 +0800 Subject: [PATCH] Fix --- axum-extra/src/handler/mod.rs | 2 +- axum-extra/src/handler/or.rs | 4 ++-- axum/src/docs/extract.md | 2 +- axum/src/extract/nested_path.rs | 2 +- examples/websockets/src/main.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/axum-extra/src/handler/mod.rs b/axum-extra/src/handler/mod.rs index 571ab677..9f330060 100644 --- a/axum-extra/src/handler/mod.rs +++ b/axum-extra/src/handler/mod.rs @@ -122,7 +122,7 @@ macro_rules! impl_handler_call_with { Fut: Future + Send + 'static, Fut::Output: IntoResponse, { - // this puts `futures_util` in our public API but thats fine in axum-extra + // this puts `futures_util` in our public API but that's fine in axum-extra type Future = Map Response>; fn call( diff --git a/axum-extra/src/handler/or.rs b/axum-extra/src/handler/or.rs index f15ccc70..18f119e6 100644 --- a/axum-extra/src/handler/or.rs +++ b/axum-extra/src/handler/or.rs @@ -26,7 +26,7 @@ where Rt: Send + 'static, Lt: Send + 'static, { - // this puts `futures_util` in our public API but thats fine in axum-extra + // this puts `futures_util` in our public API but that's fine in axum-extra type Future = EitherFuture< Map::Output) -> Response>, Map::Output) -> Response>, @@ -62,7 +62,7 @@ where Rt::Rejection: Send, S: Send + Sync + 'static, { - // this puts `futures_util` in our public API but thats fine in axum-extra + // this puts `futures_util` in our public API but that's fine in axum-extra type Future = BoxFuture<'static, Response>; fn call(self, req: Request, state: S) -> Self::Future { diff --git a/axum/src/docs/extract.md b/axum/src/docs/extract.md index ccc67ce0..41252172 100644 --- a/axum/src/docs/extract.md +++ b/axum/src/docs/extract.md @@ -283,7 +283,7 @@ more flexibility and allows us to change internal implementations without breaking the public API. For example that means while [`Json`] is implemented using [`serde_json`] it -doesn't directly expose the [`serde_json::Error`] thats contained in +doesn't directly expose the [`serde_json::Error`] that's contained in [`JsonRejection::JsonDataError`]. However it is still possible to access via methods from [`std::error::Error`]: diff --git a/axum/src/extract/nested_path.rs b/axum/src/extract/nested_path.rs index 77d13167..2e58d0e8 100644 --- a/axum/src/extract/nested_path.rs +++ b/axum/src/extract/nested_path.rs @@ -27,7 +27,7 @@ use super::rejection::NestedPathRejection; /// let api = Router::new().route( /// "/users", /// get(|path: NestedPath| async move { -/// // `path` will be "/api" because thats what this +/// // `path` will be "/api" because that's what this /// // router is nested at when we build `app` /// let path = path.as_str(); /// }) diff --git a/examples/websockets/src/main.rs b/examples/websockets/src/main.rs index fbf01986..18e8ee32 100644 --- a/examples/websockets/src/main.rs +++ b/examples/websockets/src/main.rs @@ -58,7 +58,7 @@ async fn main() { let app = Router::new() .fallback_service(ServeDir::new(assets_dir).append_index_html_on_directories(true)) .route("/ws", any(ws_handler)) - // logging so we can see whats going on + // logging so we can see what's going on .layer( TraceLayer::new_for_http() .make_span_with(DefaultMakeSpan::default().include_headers(true)),