Skip to content

Commit e365f9c

Browse files
committed
Fix dead links
1 parent a70e32e commit e365f9c

File tree

7 files changed

+20
-19
lines changed

7 files changed

+20
-19
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ matrix:
3434
- cargo test --features serde-1,log,nightly
3535
- cargo test --benches
3636
- cargo doc --no-deps --all --all-features
37+
- cargo --list | egrep "^\s*deadlinks$" -q || cargo install cargo-deadlinks
38+
- cargo deadlinks
3739
after_success:
3840
- travis-cargo --only nightly doc-upload
3941

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand"
3-
version = "0.5.0-pre.0"
3+
version = "0.5.0-pre.0" # NB: When modifying, also modify html_root_url in lib.rs
44
authors = ["The Rust Project Developers"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"
@@ -29,7 +29,7 @@ serde-1 = ["serde", "serde_derive"] # enables serialisation for PRNGs
2929
members = ["rand_core"]
3030

3131
[dependencies]
32-
rand_core = { version = '0.1.0-pre.0', default-features = false }
32+
rand_core = { path="rand_core", default-features = false }
3333
log = { version = "0.4", optional = true }
3434
serde = { version = "1", optional = true }
3535
serde_derive = { version = "1", optional = true }

rand_core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand_core"
3-
version = "0.1.0-pre.0"
3+
version = "0.1.0-pre.0" # NB: When modifying, also modify html_root_url in lib.rs
44
authors = ["The Rust Project Developers"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"

rand_core/src/lib.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ pub mod le;
8383
/// output (except by communicating that the release has breaking changes).
8484
///
8585
/// Typically implementators will implement only one of the methods available
86-
/// in this trait directly, then use the helper functions from the [`impls`]
87-
/// module to implement the other methods.
86+
/// in this trait directly, then use the helper functions from the
87+
/// [`rand_core::impls`] module to implement the other methods.
8888
///
8989
/// It is recommended that implementations also implement:
9090
///
@@ -131,7 +131,7 @@ pub mod le;
131131
/// [rand]: https://crates.io/crates/rand
132132
/// [`Rng`]: ../rand/trait.Rng.html
133133
/// [`SeedableRng`]: trait.SeedableRng.html
134-
/// [`impls`]: impls/index.html
134+
/// [`rand_core::impls`]: ../rand_core/impls/index.html
135135
/// [`try_fill_bytes`]: trait.RngCore.html#tymethod.try_fill_bytes
136136
/// [`fill_bytes`]: trait.RngCore.html#tymethod.fill_bytes
137137
/// [`next_u32`]: trait.RngCore.html#tymethod.next_u32
@@ -143,23 +143,23 @@ pub trait RngCore {
143143
/// RNGs must implement at least one method from this trait directly. In
144144
/// the case this method is not implemented directly, it can be implemented
145145
/// using `self.next_u64() as u32` or
146-
/// [via `fill_bytes`](impls/fn.next_u32_via_fill.html).
146+
/// [via `fill_bytes`](../rand_core/impls/fn.next_u32_via_fill.html).
147147
fn next_u32(&mut self) -> u32;
148148

149149
/// Return the next random `u64`.
150150
///
151151
/// RNGs must implement at least one method from this trait directly. In
152152
/// the case this method is not implemented directly, it can be implemented
153-
/// [via `next_u32`](impls/fn.next_u64_via_u32.html) or
154-
/// [via `fill_bytes`](impls/fn.next_u64_via_fill.html).
153+
/// [via `next_u32`](../rand_core/impls/fn.next_u64_via_u32.html) or
154+
/// [via `fill_bytes`](../rand_core/impls/fn.next_u64_via_fill.html).
155155
fn next_u64(&mut self) -> u64;
156156

157157
/// Fill `dest` with random data.
158158
///
159159
/// RNGs must implement at least one method from this trait directly. In
160160
/// the case this method is not implemented directly, it can be implemented
161-
/// [via `next_u32`](impls/fn.fill_bytes_via_u32.html) or
162-
/// [via `next_u64`](impls/fn.fill_bytes_via_u64.html) or
161+
/// [via `next_u32`](../rand_core/impls/fn.fill_bytes_via_u32.html) or
162+
/// [via `next_u64`](../rand_core/impls/fn.fill_bytes_via_u64.html) or
163163
/// via `try_fill_bytes`; if this generator can fail the implementation
164164
/// must choose how best to handle errors here (e.g. panic with a
165165
/// descriptive message or log a warning and retry a few times).
@@ -329,7 +329,7 @@ pub trait SeedableRng: Sized {
329329
///
330330
/// Seeding a small PRNG from another small PRNG is possible, but
331331
/// something to be careful with. An extreme example of how this can go
332-
/// wrong is seeding an [`XorShiftRng`] from another [`XorShiftRng`], which
332+
/// wrong is seeding an Xorshift RNG from another Xorshift RNG, which
333333
/// will effectively clone the generator. In general seeding from a
334334
/// generator which is hard to predict is probably okay.
335335
///
@@ -338,7 +338,6 @@ pub trait SeedableRng: Sized {
338338
///
339339
/// [`NewRng`]: ../rand/trait.NewRng.html
340340
/// [`OsRng`]: ../rand/os/struct.OsRng.html
341-
/// [`XorShiftRng`]: ../rand/struct.XorShiftRng.html
342341
fn from_rng<R: RngCore>(mut rng: R) -> Result<Self, Error> {
343342
let mut seed = Self::Seed::default();
344343
rng.try_fill_bytes(seed.as_mut())?;

src/jitter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const MEMORY_SIZE: usize = MEMORY_BLOCKS * MEMORY_BLOCKSIZE;
5050
/// This implementation is based on
5151
/// [Jitterentropy](http://www.chronox.de/jent.html) version 2.1.0.
5252
///
53-
/// [`OsRng`]: os/struct.OsRng.html
53+
/// [`OsRng`]: ../os/struct.OsRng.html
5454
pub struct JitterRng {
5555
data: u64, // Actual random number
5656
// Number of rounds to run the entropy collector per 64 bits
@@ -496,7 +496,7 @@ impl JitterRng {
496496
/// to collect 64 bits of entropy. Otherwise a [`TimerError`] with the cause
497497
/// of the failure will be returned.
498498
///
499-
/// [`TimerError`]: jitter/enum.TimerError.html
499+
/// [`TimerError`]: enum.TimerError.html
500500
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
501501
pub fn test_timer(&mut self) -> Result<u8, TimerError> {
502502
debug!("JitterRng: testing timer ...");

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@
169169
//! [`SmallRng`]: struct.SmallRng.html
170170
//! [`ReseedingRng`]: reseeding/struct.ReseedingRng.html
171171
//! [`prng`]: prng/index.html
172-
//! [`IsaacRng::new_from_u64`]: struct.IsaacRng.html#method.new_from_u64
172+
//! [`IsaacRng::new_from_u64`]: prng/isaac/struct.IsaacRng.html#method.new_from_u64
173173
//! [`Hc128Rng`]: prng/hc128/struct.Hc128Rng.html
174174
//! [`ChaChaRng`]: prng/chacha/struct.ChaChaRng.html
175-
//! [`IsaacRng`]: prng/struct.IsaacRng.html
176-
//! [`Isaac64Rng`]: prng/struct.Isaac64Rng.html
175+
//! [`IsaacRng`]: prng/isaac/struct.IsaacRng.html
176+
//! [`Isaac64Rng`]: prng/isaac64/struct.Isaac64Rng.html
177177
//! [`seq`]: seq/index.html
178178
//! [`distributions`]: distributions/index.html
179179
//! [`Uniform`]: distributions/struct.Uniform.html

src/thread_rng.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ thread_local!(
9393
/// [`ReseedingRng`]: reseeding/struct.ReseedingRng.html
9494
/// [`StdRng`]: struct.StdRng.html
9595
/// [`EntropyRng`]: struct.EntropyRng.html
96-
/// [HC-128]: struct.Hc128Rng.html
96+
/// [HC-128]: prng/hc128/struct.Hc128Rng.html
9797
pub fn thread_rng() -> ThreadRng {
9898
ThreadRng { rng: THREAD_RNG_KEY.with(|t| t.clone()) }
9999
}

0 commit comments

Comments
 (0)