Skip to content

Commit e79fcb2

Browse files
committed
Fix doc links
1 parent 89b6df9 commit e79fcb2

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ use crate::distr::{Distribution, StandardUniform};
105105
/// # Security
106106
///
107107
/// Refer to [`ThreadRng#Security`].
108+
///
109+
/// [`SysRng`]: crate::rngs::SysRng
110+
/// [`ThreadRng`]: crate::rngs::ThreadRng
111+
/// [`ThreadRng#Security`]: crate::rngs::ThreadRng#security
108112
#[cfg(feature = "sys_rng")]
109113
pub fn make_rng<R: SeedableRng>() -> R {
110114
#[cfg(feature = "thread_rng")]

src/rngs/small.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type Rng = super::xoshiro256plusplus::Xoshiro256PlusPlus;
4141
/// suitable for seeding, but note that, even with a fixed seed, output is not
4242
/// [portable]. Some suggestions:
4343
///
44-
/// 1. To automatically seed with a unique seed, use [`rand::make_rng`]:
44+
/// 1. To automatically seed with a unique seed, use [`rand::make_rng()`]:
4545
/// ```
4646
/// use rand::rngs::SmallRng;
4747
/// let mut rng: SmallRng = rand::make_rng();
@@ -73,6 +73,7 @@ type Rng = super::xoshiro256plusplus::Xoshiro256PlusPlus;
7373
/// [rand_xoshiro]: https://crates.io/crates/rand_xoshiro
7474
/// [`rand_seeder`]: https://docs.rs/rand_seeder/latest/rand_seeder/
7575
/// [`Rng`]: rand_core::Rng
76+
/// [`rand::make_rng()`]: crate::make_rng
7677
#[derive(Clone, Debug, PartialEq, Eq)]
7778
pub struct SmallRng(Rng);
7879

src/rngs/std.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use chacha20::ChaCha12Rng as Rng;
4242
/// # let _: StdRng = rng;
4343
/// ```
4444
///
45-
/// Seeding via [`rand::make_rng()`] or [`rand::rng()`](crate::rng()) may be
45+
/// Seeding via [`rand::make_rng()`] or [`rand::rng()`] may be
4646
/// faster:
4747
/// ```
4848
/// # use rand::rngs::StdRng;
@@ -66,6 +66,8 @@ use chacha20::ChaCha12Rng as Rng;
6666
/// [chacha20]: https://crates.io/crates/chacha20
6767
/// [rand issue]: https://github.com/rust-random/rand/issues/932
6868
/// [`Rng`]: rand_core::Rng
69+
/// [`rand::make_rng()`]: crate::make_rng
70+
/// [`rand::rng()`]: crate::rng
6971
#[derive(Debug, PartialEq, Eq)]
7072
pub struct StdRng(Rng);
7173

0 commit comments

Comments
 (0)