1
0
mirror of https://github.com/actix/actix-website synced 2024-11-23 16:31:08 +01:00
* fix typo

* fix another typo
This commit is contained in:
Marvin 2024-10-15 21:02:25 +02:00 committed by GitHub
parent 30edc4885d
commit f786600af3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ Alternatively, for simple use cases, you can use [_wrap_fn_][wrap_fn] to create
<CodeBlock example="middleware" file="wrap_fn.rs" section="wrap-fn" />
You can also use [_from_fn_][from_fn] to in combination with [_wrap_][wrap] to create a function as middlware.
You can also use [_from_fn_][from_fn] to in combination with [_wrap_][wrap] to create a function as middleware.
<CodeBlock example="middleware" file="from_fn.rs" section="from-fn" />

View File

@ -8,7 +8,7 @@ use actix_web::{
App, Error,
};
async fn my_midleware(
async fn my_middleware(
req: ServiceRequest,
next: Next<impl MessageBody>,
) -> Result<ServiceResponse<impl MessageBody>, Error> {
@ -19,6 +19,6 @@ async fn my_midleware(
#[actix_web::main]
async fn main() {
let app = App::new().wrap(from_fn(my_midleware));
let app = App::new().wrap(from_fn(my_middleware));
}
// </from-fn>