fix(ch02): extern crate rand

This commit is contained in:
yl2014 2018-12-05 16:50:58 +08:00
parent 8ebec19624
commit bbbedc34e6

View File

@ -349,6 +349,8 @@ rand = "0.4.0"
<span class="filename">文件名: src/main.rs</span>
```rust,ignore
extern crate rand;
use std::io;
use rand::Rng;
@ -412,6 +414,8 @@ You guessed: 5
<span class="filename">文件名: src/main.rs</span>
```rust,ignore,does_not_compile
extern crate rand;
use std::io;
use std::cmp::Ordering;
use rand::Rng;
@ -662,6 +666,8 @@ You win!
<span class="filename">文件名: src/main.rs</span>
```rust,ignore
extern crate rand;
use std::io;
use std::cmp::Ordering;
use rand::Rng;