Skip to content

Commit

Permalink
Merge pull request #711 from dhardy/master
Browse files Browse the repository at this point in the history
Fix doc links and allow failure of Android test
  • Loading branch information
dhardy authored Jan 26, 2019
2 parents 8112daa + 9ffaeb7 commit 351edce
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ matrix:
- source ~/.cargo/env || true
script:
- bash utils/ci/script.sh
allow_failures:
- env: TARGET=armv7-linux-androideabi

before_install:
- set -e
Expand Down
8 changes: 8 additions & 0 deletions rand_jitter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@
//!
//! [Jitterentropy]: http://www.chronox.de/jent.html

#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
html_root_url = "https://rust-random.github.io/rand/")]

#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
#![doc(test(attr(allow(unused_variables), deny(warnings))))]

// Note: the C implementation of `Jitterentropy` relies on being compiled
// without optimizations. This implementation goes through lengths to make the
// compiler not optimize out code which does influence timing jitter, but is
Expand Down
9 changes: 6 additions & 3 deletions src/rngs/small.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ type Rng = ::rand_pcg::Pcg32;
/// future library versions may use a different internal generator with
/// different output. Further, this generator may not be portable and can
/// produce different output depending on the architecture. If you require
/// reproducible output, use a named RNG. Refer to the documentation on the
/// [`prng`][crate::prng] module.
/// reproducible output, use a named RNG.
/// Refer to [The Book](https://rust-random.github.io/book/guide-rngs.html).
///
///
/// The current algorithm is [`Pcg64Mcg`][rand_pcg::Pcg64Mcg] on 64-bit platforms with Rust version
/// 1.26 and later, or [`Pcg32`][rand_pcg::Pcg32] otherwise.
/// 1.26 and later, or [`Pcg32`][rand_pcg::Pcg32] otherwise. Both are found in
/// the [rand_pcg] crate.
///
/// # Examples
///
Expand Down Expand Up @@ -67,6 +69,7 @@ type Rng = ::rand_pcg::Pcg32;
/// [`FromEntropy`]: crate::FromEntropy
/// [`StdRng`]: crate::rngs::StdRng
/// [`thread_rng`]: crate::thread_rng
/// [rand_pcg]: https://crates.io/crates/rand_pcg
#[derive(Clone, Debug)]
pub struct SmallRng(Rng);

Expand Down
8 changes: 6 additions & 2 deletions src/rngs/std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@ use rand_hc::Hc128Rng;
/// on the current platform, to be statistically strong and unpredictable
/// (meaning a cryptographically secure PRNG).
///
/// The current algorithm used on all platforms is [HC-128].
/// The current algorithm used on all platforms is [HC-128], found in the
/// [rand_hc] crate.
///
/// Reproducibility of output from this generator is however not required, thus
/// future library versions may use a different internal generator with
/// different output. Further, this generator may not be portable and can
/// produce different output depending on the architecture. If you require
/// reproducible output, use a named RNG, for example [`ChaChaRng`].
/// reproducible output, use a named RNG, for example [`ChaChaRng`] from the
/// [rand_chacha] crate.
///
/// [HC-128]: rand_hc::Hc128Rng
/// [`ChaChaRng`]: rand_chacha::ChaChaRng
/// [rand_hc]: https://crates.io/crates/rand_hc
/// [rand_chacha]: https://crates.io/crates/rand_chacha
#[derive(Clone, Debug)]
pub struct StdRng(Hc128Rng);

Expand Down
12 changes: 12 additions & 0 deletions tests/wasm_bindgen/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
// Copyright 2018 Developers of the Rand project.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// Crate to test WASM with the `wasm-bindgen` lib.

#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png")]

extern crate rand;
extern crate wasm_bindgen;
extern crate wasm_bindgen_test;
Expand Down

0 comments on commit 351edce

Please sign in to comment.