From 015f6e0c21dd9bfaf8cd90acbd28cccac5ffd291 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 4 Aug 2021 12:09:39 +0200 Subject: [PATCH] Fix typos found by typos-cli (#113) --- examples/sse.rs | 2 +- examples/static_file_server.rs | 2 +- examples/websocket.rs | 2 +- src/extract/extension.rs | 2 +- src/handler/mod.rs | 2 +- src/lib.rs | 8 ++++---- src/routing.rs | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/sse.rs b/examples/sse.rs index c30951db..f240b658 100644 --- a/examples/sse.rs +++ b/examples/sse.rs @@ -24,7 +24,7 @@ async fn main() { .handle_error(|error: std::io::Error| { Ok::<_, std::convert::Infallible>(( StatusCode::INTERNAL_SERVER_ERROR, - format!("Unhandled interal error: {}", error), + format!("Unhandled internal error: {}", error), )) }), ), diff --git a/examples/static_file_server.rs b/examples/static_file_server.rs index cc435cf4..31a4f281 100644 --- a/examples/static_file_server.rs +++ b/examples/static_file_server.rs @@ -18,7 +18,7 @@ async fn main() { axum::service::get(ServeDir::new(".").handle_error(|error: std::io::Error| { Ok::<_, std::convert::Infallible>(( StatusCode::INTERNAL_SERVER_ERROR, - format!("Unhandled interal error: {}", error), + format!("Unhandled internal error: {}", error), )) })), ) diff --git a/examples/websocket.rs b/examples/websocket.rs index 26cf3e25..128d1cd5 100644 --- a/examples/websocket.rs +++ b/examples/websocket.rs @@ -33,7 +33,7 @@ async fn main() { .handle_error(|error: std::io::Error| { Ok::<_, std::convert::Infallible>(( StatusCode::INTERNAL_SERVER_ERROR, - format!("Unhandled interal error: {}", error), + format!("Unhandled internal error: {}", error), )) }), ), diff --git a/src/extract/extension.rs b/src/extract/extension.rs index 47cb3d70..165f9285 100644 --- a/src/extract/extension.rs +++ b/src/extract/extension.rs @@ -32,7 +32,7 @@ use std::ops::Deref; /// # }; /// ``` /// -/// If the extension is missing it will reject the request with a `500 Interal +/// If the extension is missing it will reject the request with a `500 Internal /// Server Error` response. #[derive(Debug, Clone, Copy)] pub struct Extension(pub T); diff --git a/src/handler/mod.rs b/src/handler/mod.rs index ed065b4f..50085220 100644 --- a/src/handler/mod.rs +++ b/src/handler/mod.rs @@ -204,7 +204,7 @@ pub trait Handler: Sized { /// This can be used to add additional processing to a request for a single /// handler. /// - /// Note this differes from [`routing::Layered`](crate::routing::Layered) + /// Note this differs from [`routing::Layered`](crate::routing::Layered) /// which adds a middleware to a group of routes. /// /// # Example diff --git a/src/lib.rs b/src/lib.rs index 68f7d2bf..f71de478 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -450,7 +450,7 @@ //! However when applying middleware, or embedding other tower services, errors //! might happen. For example [`Timeout`] will return an error if the timeout //! elapses. By default these errors will be propagated all the way up to hyper -//! where the connection will be closed. If that isn't desireable you can call +//! where the connection will be closed. If that isn't desirable you can call //! [`handle_error`](handler::Layered::handle_error) to handle errors from //! adding a middleware to a handler: //! @@ -497,7 +497,7 @@ //! return `Result` where `T` implements //! [`IntoResponse`](response::IntoResponse). //! -//! See [`routing::Layered::handle_error`] fo more details. +//! See [`routing::Layered::handle_error`] for more details. //! //! ## Applying multiple middleware //! @@ -646,7 +646,7 @@ //! # Examples //! //! The axum repo contains [a number of examples][examples] that show how to put all the -//! pieces togehter. +//! pieces together. //! //! # Feature flags //! @@ -656,7 +656,7 @@ //! The following optional features are available: //! //! - `ws`: Enables WebSockets support. -//! - `headers`: Enables extracing typed headers via [`extract::TypedHeader`]. +//! - `headers`: Enables extracting typed headers via [`extract::TypedHeader`]. //! - `multipart`: Enables parsing `multipart/form-data` requests with [`extract::Multipart`]. //! //! [`tower`]: https://crates.io/crates/tower diff --git a/src/routing.rs b/src/routing.rs index 4a74763b..7a230831 100644 --- a/src/routing.rs +++ b/src/routing.rs @@ -182,7 +182,7 @@ pub trait RoutingDsl: crate::sealed::Sealed + Sized { /// This can be used to add additional processing to a request for a group /// of routes. /// - /// Note this differes from [`handler::Layered`](crate::handler::Layered) + /// Note this differs from [`handler::Layered`](crate::handler::Layered) /// which adds a middleware to a single handler. /// /// # Example