diff --git a/examples/hello-world/src/main.rs b/examples/hello-world/src/main.rs index f5532084..de069fa1 100644 --- a/examples/hello-world/src/main.rs +++ b/examples/hello-world/src/main.rs @@ -4,7 +4,7 @@ //! cargo run -p example-hello-world //! ``` -use axum::{handler::get, Router}; +use axum::{handler::get, response::Html, Router}; use std::net::SocketAddr; #[tokio::main] @@ -21,6 +21,6 @@ async fn main() { .unwrap(); } -async fn handler() -> &'static str { - "

Hello, World!

" +async fn handler() -> Html<&'static str> { + Html("

Hello, World!

") }