From 621ca1a984152b06af9a8f00d6dae27b58defb0a Mon Sep 17 00:00:00 2001 From: David Pedersen Date: Sat, 16 Sep 2023 22:09:57 +0200 Subject: [PATCH] fix typo --- axum/src/routing/path_router.rs | 4 ++-- axum/src/typed_header.rs | 2 +- examples/diesel-postgres/src/main.rs | 2 +- examples/prometheus-metrics/src/main.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/axum/src/routing/path_router.rs b/axum/src/routing/path_router.rs index b415f4f7..eec0c57d 100644 --- a/axum/src/routing/path_router.rs +++ b/axum/src/routing/path_router.rs @@ -340,12 +340,12 @@ where url_params::insert_url_params(req.extensions_mut(), match_.params); - let endpont = self + let endpoint = self .routes .get_mut(&id) .expect("no route for id. This is a bug in axum. Please file an issue"); - match endpont { + match endpoint { Endpoint::MethodRouter(method_router) => { Ok(method_router.call_with_state(req, state)) } diff --git a/axum/src/typed_header.rs b/axum/src/typed_header.rs index 72b3d7e7..c924f281 100644 --- a/axum/src/typed_header.rs +++ b/axum/src/typed_header.rs @@ -130,7 +130,7 @@ impl TypedHeaderRejection { pub enum TypedHeaderRejectionReason { /// The header was missing from the HTTP request Missing, - /// An error occured when parsing the header from the HTTP request + /// An error occurred when parsing the header from the HTTP request Error(headers::Error), } diff --git a/examples/diesel-postgres/src/main.rs b/examples/diesel-postgres/src/main.rs index 968b1dce..0b82a02e 100644 --- a/examples/diesel-postgres/src/main.rs +++ b/examples/diesel-postgres/src/main.rs @@ -23,7 +23,7 @@ use std::net::SocketAddr; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; // this embeddes the migrations into the application binary -// the migration path is releative to the `CARGO_MANIFEST_DIR` +// the migration path is relative to the `CARGO_MANIFEST_DIR` pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!("migrations/"); // normally part of your generated schema.rs file diff --git a/examples/prometheus-metrics/src/main.rs b/examples/prometheus-metrics/src/main.rs index cf7db5ac..332cc188 100644 --- a/examples/prometheus-metrics/src/main.rs +++ b/examples/prometheus-metrics/src/main.rs @@ -54,7 +54,7 @@ async fn start_main_server() { async fn start_metrics_server() { let app = metrics_app(); - // NOTE: expose metrics enpoint on a different port + // NOTE: expose metrics endpoint on a different port let addr = SocketAddr::from(([127, 0, 0, 1], 3001)); tracing::debug!("listening on {}", addr); axum::Server::bind(&addr)