mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-06 00:00:17 +02:00
Fix typos found by typos-cli (#113)
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ async fn main() {
|
|||||||
.handle_error(|error: std::io::Error| {
|
.handle_error(|error: std::io::Error| {
|
||||||
Ok::<_, std::convert::Infallible>((
|
Ok::<_, std::convert::Infallible>((
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
StatusCode::INTERNAL_SERVER_ERROR,
|
||||||
format!("Unhandled interal error: {}", error),
|
format!("Unhandled internal error: {}", error),
|
||||||
))
|
))
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ async fn main() {
|
|||||||
axum::service::get(ServeDir::new(".").handle_error(|error: std::io::Error| {
|
axum::service::get(ServeDir::new(".").handle_error(|error: std::io::Error| {
|
||||||
Ok::<_, std::convert::Infallible>((
|
Ok::<_, std::convert::Infallible>((
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
StatusCode::INTERNAL_SERVER_ERROR,
|
||||||
format!("Unhandled interal error: {}", error),
|
format!("Unhandled internal error: {}", error),
|
||||||
))
|
))
|
||||||
})),
|
})),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ async fn main() {
|
|||||||
.handle_error(|error: std::io::Error| {
|
.handle_error(|error: std::io::Error| {
|
||||||
Ok::<_, std::convert::Infallible>((
|
Ok::<_, std::convert::Infallible>((
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
StatusCode::INTERNAL_SERVER_ERROR,
|
||||||
format!("Unhandled interal error: {}", error),
|
format!("Unhandled internal error: {}", error),
|
||||||
))
|
))
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -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.
|
/// Server Error` response.
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct Extension<T>(pub T);
|
pub struct Extension<T>(pub T);
|
||||||
|
|||||||
+1
-1
@@ -204,7 +204,7 @@ pub trait Handler<B, In>: Sized {
|
|||||||
/// This can be used to add additional processing to a request for a single
|
/// This can be used to add additional processing to a request for a single
|
||||||
/// handler.
|
/// 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.
|
/// which adds a middleware to a group of routes.
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
|
|||||||
+4
-4
@@ -450,7 +450,7 @@
|
|||||||
//! However when applying middleware, or embedding other tower services, errors
|
//! However when applying middleware, or embedding other tower services, errors
|
||||||
//! might happen. For example [`Timeout`] will return an error if the timeout
|
//! 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
|
//! 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
|
//! [`handle_error`](handler::Layered::handle_error) to handle errors from
|
||||||
//! adding a middleware to a handler:
|
//! adding a middleware to a handler:
|
||||||
//!
|
//!
|
||||||
@@ -497,7 +497,7 @@
|
|||||||
//! return `Result<T, E>` where `T` implements
|
//! return `Result<T, E>` where `T` implements
|
||||||
//! [`IntoResponse`](response::IntoResponse).
|
//! [`IntoResponse`](response::IntoResponse).
|
||||||
//!
|
//!
|
||||||
//! See [`routing::Layered::handle_error`] fo more details.
|
//! See [`routing::Layered::handle_error`] for more details.
|
||||||
//!
|
//!
|
||||||
//! ## Applying multiple middleware
|
//! ## Applying multiple middleware
|
||||||
//!
|
//!
|
||||||
@@ -646,7 +646,7 @@
|
|||||||
//! # Examples
|
//! # Examples
|
||||||
//!
|
//!
|
||||||
//! The axum repo contains [a number of examples][examples] that show how to put all the
|
//! The axum repo contains [a number of examples][examples] that show how to put all the
|
||||||
//! pieces togehter.
|
//! pieces together.
|
||||||
//!
|
//!
|
||||||
//! # Feature flags
|
//! # Feature flags
|
||||||
//!
|
//!
|
||||||
@@ -656,7 +656,7 @@
|
|||||||
//! The following optional features are available:
|
//! The following optional features are available:
|
||||||
//!
|
//!
|
||||||
//! - `ws`: Enables WebSockets support.
|
//! - `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`].
|
//! - `multipart`: Enables parsing `multipart/form-data` requests with [`extract::Multipart`].
|
||||||
//!
|
//!
|
||||||
//! [`tower`]: https://crates.io/crates/tower
|
//! [`tower`]: https://crates.io/crates/tower
|
||||||
|
|||||||
+1
-1
@@ -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
|
/// This can be used to add additional processing to a request for a group
|
||||||
/// of routes.
|
/// 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.
|
/// which adds a middleware to a single handler.
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
|
|||||||
Reference in New Issue
Block a user