File tree Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ If you'd like to read it locally:
21
21
``` bash
22
22
$ git clone https://github.com/rust-lang-nursery/rust-cookbook
23
23
$ cd rust-cookbook
24
- $ cargo install mdbook --vers " 0.1.7 "
24
+ $ cargo install mdbook --vers " 0.1.8 "
25
25
$ mdbook serve --open
26
26
```
27
27
Original file line number Diff line number Diff line change @@ -63,10 +63,6 @@ echo "Committing book directory to gh-pages branch"
63
63
REV=$( git rev-parse --short HEAD)
64
64
cd book
65
65
66
- # hotfix for https://github.com/rust-lang-nursery/rust-cookbook/issues/416
67
- sed -i -e " s/_FontAwesome/FontAwesome/" * .html
68
- mv ./_FontAwesome ./FontAwesome
69
-
70
66
git init
71
67
git remote add upstream " https://$GH_TOKEN @github.com/rust-lang-nursery/rust-cookbook.git"
72
68
git config user.name " Rust Cookbook"
Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ if [[ "${CONTENT_TESTS:-}" == 1 ]]; then
16
16
pyenv global system 3.6
17
17
pip3 install --user link-checker==0.1.0
18
18
fi
19
- cargo install mdbook --vers ' 0.1.7 ' --debug
19
+ cargo install mdbook --vers ' 0.1.8 ' --debug
20
20
fi
21
21
22
22
exit 0
23
-
Original file line number Diff line number Diff line change @@ -187,18 +187,18 @@ fn main() {
187
187
}
188
188
```
189
189
190
- Alternatively, one can use [ ` Range ` ] to obtain values with [ uniform distribution] .
190
+ Alternatively, one can use [ ` Uniform ` ] to obtain values with [ uniform distribution] .
191
191
This has the same effect, but may be faster when repeatedly generating numbers
192
192
in the same range.
193
193
194
194
``` rust
195
195
extern crate rand;
196
196
197
- use rand :: distributions :: {Range , Distribution };
197
+ use rand :: distributions :: {Uniform , Distribution };
198
198
199
199
fn main () {
200
200
let mut rng = rand :: thread_rng ();
201
- let die = Range :: new (1 , 7 );
201
+ let die = Uniform :: new (1 , 7 );
202
202
203
203
loop {
204
204
let throw = die . sample (& mut rng );
@@ -1839,7 +1839,7 @@ fn run() -> Result<()> {
1839
1839
[ `process::Stdio` ] : https://doc.rust-lang.org/std/process/struct.Stdio.html
1840
1840
[ `rand::Rng` ] : https://docs.rs/rand/*/rand/trait.Rng.html
1841
1841
[ `rand::thread_rng` ] : https://docs.rs/rand/*/rand/fn.thread_rng.html
1842
- [ `Range ` ] : https://docs.rs/rand/*/rand/distributions/#reexports
1842
+ [ `Uniform ` ] : https://docs.rs/rand/*/rand/distributions/uniform/struct.Uniform.html
1843
1843
[ `Standard` ] : https://docs.rs/rand/*/rand/distributions/struct.Standard.html
1844
1844
[ `Distribution` ] : https://docs.rs/rand/*/rand/distributions/trait.Distribution.html
1845
1845
[ `Read` ] : https://doc.rust-lang.org/std/io/trait.Read.html
You can’t perform that action at this time.
0 commit comments