Skip to content

Mdbook 18 #425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If you'd like to read it locally:
```bash
$ git clone https://github.com/rust-lang-nursery/rust-cookbook
$ cd rust-cookbook
$ cargo install mdbook --vers "0.1.7"
$ cargo install mdbook --vers "0.1.8"
$ mdbook serve --open
```

Expand Down
4 changes: 0 additions & 4 deletions ci/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ echo "Committing book directory to gh-pages branch"
REV=$(git rev-parse --short HEAD)
cd book

# hotfix for https://github.com/rust-lang-nursery/rust-cookbook/issues/416
sed -i -e "s/_FontAwesome/FontAwesome/" *.html
mv ./_FontAwesome ./FontAwesome

git init
git remote add upstream "https://[email protected]/rust-lang-nursery/rust-cookbook.git"
git config user.name "Rust Cookbook"
Expand Down
3 changes: 1 addition & 2 deletions ci/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ if [[ "${CONTENT_TESTS:-}" == 1 ]]; then
pyenv global system 3.6
pip3 install --user link-checker==0.1.0
fi
cargo install mdbook --vers '0.1.7' --debug
cargo install mdbook --vers '0.1.8' --debug
fi

exit 0

8 changes: 4 additions & 4 deletions src/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,18 @@ fn main() {
}
```

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

```rust
extern crate rand;

use rand::distributions::{Range, Distribution};
use rand::distributions::{Uniform, Distribution};

fn main() {
let mut rng = rand::thread_rng();
let die = Range::new(1, 7);
let die = Uniform::new(1, 7);

loop {
let throw = die.sample(&mut rng);
Expand Down Expand Up @@ -1839,7 +1839,7 @@ fn run() -> Result<()> {
[`process::Stdio`]: https://doc.rust-lang.org/std/process/struct.Stdio.html
[`rand::Rng`]: https://docs.rs/rand/*/rand/trait.Rng.html
[`rand::thread_rng`]: https://docs.rs/rand/*/rand/fn.thread_rng.html
[`Range`]: https://docs.rs/rand/*/rand/distributions/#reexports
[`Uniform`]: https://docs.rs/rand/*/rand/distributions/uniform/struct.Uniform.html
[`Standard`]: https://docs.rs/rand/*/rand/distributions/struct.Standard.html
[`Distribution`]: https://docs.rs/rand/*/rand/distributions/trait.Distribution.html
[`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
Expand Down