diff --git a/src/Home.md b/src/Home.md index 36a9be4..42ce40e 100644 --- a/src/Home.md +++ b/src/Home.md @@ -33,7 +33,7 @@ maps to: use fltk::{prelude::*, window}; fn main() { - let wind = window::Window::new(100, 100, 400, 300, "My Window"); + let mut wind = window::Window::new(100, 100, 400, 300, "My Window"); wind.end(); wind.show(); } @@ -70,7 +70,7 @@ To make our first Rust code sample work, we need to import the necessary fltk mo use fltk::{prelude::*, window::Window}; fn main() { - let wind = Window::new(100, 100, 400, 300, "My Window"); + let mut wind = Window::new(100, 100, 400, 300, "My Window"); wind.end(); wind.show(); } @@ -82,7 +82,7 @@ use fltk::{app, prelude::*, window::Window}; fn main() { let a = app::App::default(); - let wind = Window::new(100, 100, 400, 300, "My Window"); + let mut wind = Window::new(100, 100, 400, 300, "My Window"); wind.end(); wind.show(); a.run().unwrap(); @@ -95,4 +95,4 @@ The book is generated using [mdbook](https://github.com/rust-lang/mdBook) on the As such, you would need to `cargo install mdbook`. More instructions can be found in fltk-book's README and in mdbook's [user guide](https://rust-lang.github.io/mdBook/). -You can also contribute to the Chinese translation [here](https://github.com/Flatigers/fltk-book-zh) \ No newline at end of file +You can also contribute to the Chinese translation [here](https://github.com/Flatigers/fltk-book-zh)