From bf7e64de71f78615b0d143aefb45763ea8f2aee1 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Tue, 9 Sep 2025 01:01:18 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Corrige=20doc=20y=20c=C3=B3digo?= =?UTF-8?q?=20por=20cambios=20en=20Page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- examples/hello-name.rs | 2 +- examples/hello-world.rs | 2 +- src/lib.rs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9d5efc88..c6c12e0e 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,8 @@ impl Extension for HelloWorld { } async fn hello_world(request: HttpRequest) -> ResultPage { - Page::new(Some(request)) - .with_component(Html::with(move |_| html! { h1 { "Hello World!" } })) + Page::new(request) + .add_component(Html::with(move |_| html! { h1 { "Hello World!" } })) .render() } diff --git a/examples/hello-name.rs b/examples/hello-name.rs index 3a491a68..e1285d09 100644 --- a/examples/hello-name.rs +++ b/examples/hello-name.rs @@ -13,7 +13,7 @@ async fn hello_name( path: service::web::Path, ) -> ResultPage { let name = path.into_inner(); - Page::new(Some(request)) + Page::new(request) .add_component(Html::with(move |_| html! { h1 { "Hello " (name) "!" } })) .render() } diff --git a/examples/hello-world.rs b/examples/hello-world.rs index 5550514b..d56f2105 100644 --- a/examples/hello-world.rs +++ b/examples/hello-world.rs @@ -9,7 +9,7 @@ impl Extension for HelloWorld { } async fn hello_world(request: HttpRequest) -> ResultPage { - Page::new(Some(request)) + Page::new(request) .add_component(Html::with(move |_| html! { h1 { "Hello World!" } })) .render() } diff --git a/src/lib.rs b/src/lib.rs index e43da2f2..93b8564b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -60,8 +60,8 @@ impl Extension for HelloWorld { } async fn hello_world(request: HttpRequest) -> ResultPage { - Page::new(Some(request)) - .with_component(Html::with(move |_| html! { h1 { "Hello World!" } })) + Page::new(request) + .add_component(Html::with(move |_| html! { h1 { "Hello World!" } })) .render() }