From 530aa5530cde4eebfdbf78d59710472b8e360e15 Mon Sep 17 00:00:00 2001 From: Rdbo <57117082+rdbo@users.noreply.github.com> Date: Fri, 26 Jan 2024 18:17:40 -0300 Subject: [PATCH] Fix typos in testing example (#2542) --- examples/testing/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/testing/src/main.rs b/examples/testing/src/main.rs index 2879b69a..fb1e3794 100644 --- a/examples/testing/src/main.rs +++ b/examples/testing/src/main.rs @@ -43,7 +43,7 @@ fn app() -> Router { }), ) .route( - "/requires-connect-into", + "/requires-connect-info", get(|ConnectInfo(addr): ConnectInfo| async move { format!("Hi {addr}") }), ) // We can still add middleware @@ -179,7 +179,7 @@ mod tests { assert_eq!(response.status(), StatusCode::OK); } - // Here we're calling `/requires-connect-into` which requires `ConnectInfo` + // Here we're calling `/requires-connect-info` which requires `ConnectInfo` // // That is normally set with `Router::into_make_service_with_connect_info` but we can't easily // use that during tests. The solution is instead to set the `MockConnectInfo` layer during @@ -191,7 +191,7 @@ mod tests { .into_service(); let request = Request::builder() - .uri("/requires-connect-into") + .uri("/requires-connect-info") .body(Body::empty()) .unwrap(); let response = app.ready().await.unwrap().call(request).await.unwrap();