diff --git a/docs/book/src/interlude_projecting_children.md b/docs/book/src/interlude_projecting_children.md index 312e63e75..bd46ec700 100644 --- a/docs/book/src/interlude_projecting_children.md +++ b/docs/book/src/interlude_projecting_children.md @@ -135,17 +135,17 @@ pub fn App() -> impl IntoView { } #[component] -pub fn Outer(ChildrenFn) -> impl IntoView { +pub fn Outer(children: ChildrenFn) -> impl IntoView { children() } #[component] -pub fn Inner(ChildrenFn) -> impl IntoView { +pub fn Inner(children: ChildrenFn) -> impl IntoView { children() } #[component] -pub fn Inmost(ng) -> impl IntoView { +pub fn Inmost(name: String) -> impl IntoView { view! {

{name}

} diff --git a/docs/book/src/testing.md b/docs/book/src/testing.md index bf9f50a46..7e2efbc92 100644 --- a/docs/book/src/testing.md +++ b/docs/book/src/testing.md @@ -30,7 +30,7 @@ pub struct Todos(Vec); impl Todos { pub fn num_remaining(&self) -> usize { - todos.iter().filter(|todo| !todo.completed).sum() + self.0.iter().filter(|todo| !todo.completed).sum() } }