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