Skip to content

Commit 26533d3

Browse files
authored
Merge pull request #14 from LateNightIceCream/patch-1
Update Home.md: make wind mutable
2 parents cb2e5bf + 99ef060 commit 26533d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Home.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ maps to:
3333
use fltk::{prelude::*, window};
3434

3535
fn main() {
36-
let wind = window::Window::new(100, 100, 400, 300, "My Window");
36+
let mut wind = window::Window::new(100, 100, 400, 300, "My Window");
3737
wind.end();
3838
wind.show();
3939
}
@@ -70,7 +70,7 @@ To make our first Rust code sample work, we need to import the necessary fltk mo
7070
use fltk::{prelude::*, window::Window};
7171

7272
fn main() {
73-
let wind = Window::new(100, 100, 400, 300, "My Window");
73+
let mut wind = Window::new(100, 100, 400, 300, "My Window");
7474
wind.end();
7575
wind.show();
7676
}
@@ -82,7 +82,7 @@ use fltk::{app, prelude::*, window::Window};
8282

8383
fn main() {
8484
let a = app::App::default();
85-
let wind = Window::new(100, 100, 400, 300, "My Window");
85+
let mut wind = Window::new(100, 100, 400, 300, "My Window");
8686
wind.end();
8787
wind.show();
8888
a.run().unwrap();
@@ -95,4 +95,4 @@ The book is generated using [mdbook](https://github.com/rust-lang/mdBook) on the
9595

9696
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/).
9797

98-
You can also contribute to the Chinese translation [here](https://github.com/Flatigers/fltk-book-zh)
98+
You can also contribute to the Chinese translation [here](https://github.com/Flatigers/fltk-book-zh)

0 commit comments

Comments
 (0)