File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ We use the following labels:
44
44
45
45
## Development workflow
46
46
47
- To build RBE, [ install Rust] , and then:
47
+ To build RBE, [ install Rust] ( https://www.rust-lang.org/tools/install ) , and then:
48
48
49
49
``` bash
50
50
$ git clone https://github.com/rust-lang/rust-by-example
@@ -56,7 +56,7 @@ $ mdbook build
56
56
[ install Rust ] : http://rust-lang.org/install.html
57
57
58
58
The files will be in the ` book ` directory at the top-level; ` mdbook serve ` will
59
- open the contents in your web browser.
59
+ open the contents in your web browser ( [ localhost:3000 ] ( http://localhost:3000 ) by default) .
60
60
61
61
To run the tests:
62
62
Original file line number Diff line number Diff line change 2
2
3
3
4
4
> 🛈 stable since: rust 1.65
5
+ >
6
+ > 🛈 you can target specific edition by compiling like this
7
+ > ` rustc --edition=2021 main.rs `
5
8
6
9
7
10
With ` let ` -` else ` , a refutable pattern can match and bind variables
@@ -22,7 +25,9 @@ fn get_count_item(s: &str) -> (u64, &str) {
22
25
(count , item )
23
26
}
24
27
25
- assert_eq! (get_count_item (" 3 chairs" ), (3 , " chairs" ));
28
+ fn main () {
29
+ assert_eq! (get_count_item (" 3 chairs" ), (3 , " chairs" ));
30
+ }
26
31
```
27
32
28
33
The scope of name bindings is the main thing that makes this different from
You can’t perform that action at this time.
0 commit comments