Skip to content

Commit

Permalink
docs: minor fixes for some code examples in the book (#2077)
Browse files Browse the repository at this point in the history
  • Loading branch information
rockie authored Nov 29, 2023
1 parent 75c27e0 commit 9c44da2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/book/src/interlude_projecting_children.md
Original file line number Diff line number Diff line change
Expand Up @@ -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! {
<p>{name}</p>
}
Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub struct Todos(Vec<Todo>);

impl Todos {
pub fn num_remaining(&self) -> usize {
todos.iter().filter(|todo| !todo.completed).sum()
self.0.iter().filter(|todo| !todo.completed).sum()
}
}

Expand Down

0 comments on commit 9c44da2

Please sign in to comment.