mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-04-20 11:48:01 +08:00
fix(ch02): extern crate rand
This commit is contained in:
parent
8ebec19624
commit
bbbedc34e6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user