Skip to content

Fix doc links and allow failure of Android test #711

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 4 commits into from
Jan 26, 2019
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: 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