diff --git a/src/ch02-00-guessing-game-tutorial.md b/src/ch02-00-guessing-game-tutorial.md index 4ce9676..d245ad1 100644 --- a/src/ch02-00-guessing-game-tutorial.md +++ b/src/ch02-00-guessing-game-tutorial.md @@ -349,6 +349,8 @@ rand = "0.4.0" 文件名: src/main.rs ```rust,ignore +extern crate rand; + use std::io; use rand::Rng; @@ -412,6 +414,8 @@ You guessed: 5 文件名: src/main.rs ```rust,ignore,does_not_compile +extern crate rand; + use std::io; use std::cmp::Ordering; use rand::Rng; @@ -662,6 +666,8 @@ You win! 文件名: src/main.rs ```rust,ignore +extern crate rand; + use std::io; use std::cmp::Ordering; use rand::Rng;