Skip to content

Commit 243a9ba

Browse files
huangjj27AndyGauge
authored andcommitted
* fix broken Rang link
* fix conflict from upstream * Wildcard link to rand's Uniform mdBook 0.1.8
1 parent 0c167cb commit 243a9ba

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If you'd like to read it locally:
2121
```bash
2222
$ git clone https://github.com/rust-lang-nursery/rust-cookbook
2323
$ cd rust-cookbook
24-
$ cargo install mdbook --vers "0.1.7"
24+
$ cargo install mdbook --vers "0.1.8"
2525
$ mdbook serve --open
2626
```
2727

ci/deploy.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ echo "Committing book directory to gh-pages branch"
6363
REV=$(git rev-parse --short HEAD)
6464
cd book
6565

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-
7066
git init
7167
git remote add upstream "https://$GH_TOKEN@github.com/rust-lang-nursery/rust-cookbook.git"
7268
git config user.name "Rust Cookbook"

ci/install_deps.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ if [[ "${CONTENT_TESTS:-}" == 1 ]]; then
1616
pyenv global system 3.6
1717
pip3 install --user link-checker==0.1.0
1818
fi
19-
cargo install mdbook --vers '0.1.7' --debug
19+
cargo install mdbook --vers '0.1.8' --debug
2020
fi
2121

2222
exit 0
23-

src/basics.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,18 +187,18 @@ fn main() {
187187
}
188188
```
189189

190-
Alternatively, one can use [`Range`] to obtain values with [uniform distribution].
190+
Alternatively, one can use [`Uniform`] to obtain values with [uniform distribution].
191191
This has the same effect, but may be faster when repeatedly generating numbers
192192
in the same range.
193193

194194
```rust
195195
extern crate rand;
196196

197-
use rand::distributions::{Range, Distribution};
197+
use rand::distributions::{Uniform, Distribution};
198198

199199
fn main() {
200200
let mut rng = rand::thread_rng();
201-
let die = Range::new(1, 7);
201+
let die = Uniform::new(1, 7);
202202

203203
loop {
204204
let throw = die.sample(&mut rng);
@@ -1839,7 +1839,7 @@ fn run() -> Result<()> {
18391839
[`process::Stdio`]: https://doc.rust-lang.org/std/process/struct.Stdio.html
18401840
[`rand::Rng`]: https://docs.rs/rand/*/rand/trait.Rng.html
18411841
[`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
18431843
[`Standard`]: https://docs.rs/rand/*/rand/distributions/struct.Standard.html
18441844
[`Distribution`]: https://docs.rs/rand/*/rand/distributions/trait.Distribution.html
18451845
[`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html

0 commit comments

Comments
 (0)