Skip to content

Commit

Permalink
Merge pull request #2 from fzdwx/main
Browse files Browse the repository at this point in the history
fix documentation example errors
  • Loading branch information
Fancyflame committed Apr 28, 2023
2 parents efafcf7 + d1c7778 commit 8d91f61
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion irisia-book/src/get_started/first_window.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ use irisia::{
textbox::TextBox,
Element,
render_fn,
element::{NeverInitalized, NoProps},
};

#[derive(Default)]
Expand All @@ -49,6 +50,13 @@ impl Element for MyApp {
text: "hello world"
}
}

fn create(_: irisia::element::RuntimeInit<Self>) -> Self {
Self{}
}

type Props<'a> = NoProps;
type ChildProps<'a> = NeverInitalized;
}
```

Expand Down Expand Up @@ -81,7 +89,7 @@ use irisia::{
#
#[irisia::main]
async fn main() {
Window::new::<MyApp>("my first app").await.join().await;
Window::new::<MyApp>("my first app").await.unwrap().join().await;
}
```

Expand Down
2 changes: 1 addition & 1 deletion irisia-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ irisia_backend = { path = "../irisia-backend", features = ["fps_recorder"] }
anyhow = "1"
take_mut = "0.2"
smallvec = "1.9"
tokio = { version = "1.28", features = ["sync", "time", "rt-multi-thread"] }
tokio = { version = "1.28", features = ["sync", "time", "macros", "rt-multi-thread"] }

0 comments on commit 8d91f61

Please sign in to comment.