From f786600af349b919c38507056344593d8eac7d25 Mon Sep 17 00:00:00 2001
From: Marvin <33938500+marvin-j97@users.noreply.github.com>
Date: Tue, 15 Oct 2024 21:02:25 +0200
Subject: [PATCH] fix typo (#474)
* fix typo
* fix another typo
---
docs/middleware.md | 2 +-
examples/middleware/src/from_fn.rs | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/middleware.md b/docs/middleware.md
index a8551a4..ee2a860 100644
--- a/docs/middleware.md
+++ b/docs/middleware.md
@@ -27,7 +27,7 @@ Alternatively, for simple use cases, you can use [_wrap_fn_][wrap_fn] to create
-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.
diff --git a/examples/middleware/src/from_fn.rs b/examples/middleware/src/from_fn.rs
index 2c5ccc0..461b8e1 100644
--- a/examples/middleware/src/from_fn.rs
+++ b/examples/middleware/src/from_fn.rs
@@ -8,7 +8,7 @@ use actix_web::{
App, Error,
};
-async fn my_midleware(
+async fn my_middleware(
req: ServiceRequest,
next: Next,
) -> Result, 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));
}
//