This commit is contained in:
David Pedersen
2023-09-16 22:24:00 +02:00
parent 508f7d8166
commit 621ca1a984
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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))
}
+1 -1
View File
@@ -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),
}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)