@@ -1813,7 +1813,7 @@ Try it out:
1813
1813
1814
1814
``` {notrust,ignore}
1815
1815
$ cargo run
1816
- Compiling guessing_game v0.1.0 (file:/home/you/projects/guessing_game)
1816
+ Compiling guessing_game v0.1.0 (file:/// home/you/projects/guessing_game)
1817
1817
Running `target/guessing_game`
1818
1818
Hello, world!
1819
1819
```
@@ -1955,17 +1955,12 @@ fn main() {
1955
1955
}
1956
1956
```
1957
1957
1958
- ... and then recompile :
1958
+ Try running our new program a few times :
1959
1959
1960
1960
``` {notrust,ignore}
1961
- $ cargo build
1962
- Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
1963
- ```
1964
-
1965
- Excellent! Try running our new program a few times:
1966
-
1967
- ``` {notrust,ignore}
1968
- $ ./target/guessing_game
1961
+ $ cargo run
1962
+ Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
1963
+ Running `target/guessing_game`
1969
1964
Guess the number!
1970
1965
The secret number is: 7
1971
1966
Please input your guess.
@@ -2016,9 +2011,9 @@ fn main() {
2016
2011
And trying it out:
2017
2012
2018
2013
``` {notrust,ignore}
2019
- $ cargo build
2020
- Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
2021
- $ ./ target/guessing_game
2014
+ $ cargo run
2015
+ Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
2016
+ Running ` target/guessing_game`
2022
2017
Guess the number!
2023
2018
The secret number is: 57
2024
2019
Please input your guess.
@@ -2287,9 +2282,9 @@ We use a `match` to either give us the `uint` inside of the `Option`, or we
2287
2282
print an error message and return. Let's give this a shot:
2288
2283
2289
2284
``` {notrust,ignore}
2290
- $ cargo build
2291
- Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
2292
- $ ./ target/guessing_game
2285
+ $ cargo run
2286
+ Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
2287
+ Running ` target/guessing_game`
2293
2288
Guess the number!
2294
2289
The secret number is: 17
2295
2290
Please input your guess.
@@ -2352,9 +2347,9 @@ fn cmp(a: uint, b: uint) -> Ordering {
2352
2347
Let's try it!
2353
2348
2354
2349
``` {notrust,ignore}
2355
- $ cargo build
2356
- Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
2357
- $ ./ target/guessing_game
2350
+ $ cargo run
2351
+ Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
2352
+ Running ` target/guessing_game`
2358
2353
Guess the number!
2359
2354
The secret number is: 58
2360
2355
Please input your guess.
@@ -2429,9 +2424,9 @@ And try it out. But wait, didn't we just add an infinite loop? Yup. Remember
2429
2424
that ` return ` ? If we give a non-number answer, we'll ` return ` and quit. Observe:
2430
2425
2431
2426
``` {notrust,ignore}
2432
- $ cargo build
2433
- Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
2434
- $ ./ target/guessing_game
2427
+ $ cargo run
2428
+ Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
2429
+ Running ` target/guessing_game`
2435
2430
Guess the number!
2436
2431
The secret number is: 59
2437
2432
Please input your guess.
@@ -2560,10 +2555,10 @@ fn cmp(a: uint, b: uint) -> Ordering {
2560
2555
2561
2556
Now we should be good! Let's try:
2562
2557
2563
- ``` {rust ,ignore}
2564
- $ cargo build
2565
- Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
2566
- $ ./ target/guessing_game
2558
+ ``` {notrust ,ignore}
2559
+ $ cargo run
2560
+ Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
2561
+ Running ` target/guessing_game`
2567
2562
Guess the number!
2568
2563
The secret number is: 61
2569
2564
Please input your guess.
0 commit comments