From f3aab23fba4394f2176ba5287930e21c77743b86 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Sat, 20 Jul 2024 15:56:27 +0700 Subject: [PATCH] Fix `clippy::doc_markdown` warnings. (#1474) --- clippy.toml | 2 ++ rand_core/src/block.rs | 2 +- src/distributions/other.rs | 2 +- src/distributions/uniform.rs | 4 ++-- src/seq/index.rs | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 clippy.toml diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 0000000000..14793c5204 --- /dev/null +++ b/clippy.toml @@ -0,0 +1,2 @@ +# Don't warn about these identifiers when using clippy::doc_markdown. +doc-valid-idents = ["ChaCha", "ChaCha12", "SplitMix64", "ZiB", ".."] diff --git a/rand_core/src/block.rs b/rand_core/src/block.rs index 6872af432f..9f227bb75b 100644 --- a/rand_core/src/block.rs +++ b/rand_core/src/block.rs @@ -276,7 +276,7 @@ impl> CryptoRng for BlockRng {} /// then the other half is then consumed, however both [`next_u64`] and /// [`fill_bytes`] discard the rest of any half-consumed `u64`s when called. /// -/// [`fill_bytes`] `] consume a whole number of `u64` values. If the requested length +/// [`fill_bytes`] consumes a whole number of `u64` values. If the requested length /// is not a multiple of 8, some bytes will be discarded. /// /// [`next_u32`]: RngCore::next_u32 diff --git a/src/distributions/other.rs b/src/distributions/other.rs index 21289ca94d..5b05854ac2 100644 --- a/src/distributions/other.rs +++ b/src/distributions/other.rs @@ -189,7 +189,7 @@ where } } -/// Implement `Distribution<(A, B, C, ...)> for Standard, using the list of +/// Implement `Distribution<(A, B, C, ...)> for Standard`, using the list of /// identifiers macro_rules! tuple_impl { ($($tyvar:ident)*) => { diff --git a/src/distributions/uniform.rs b/src/distributions/uniform.rs index 5540b74e46..306b0cced6 100644 --- a/src/distributions/uniform.rs +++ b/src/distributions/uniform.rs @@ -371,8 +371,8 @@ impl TryFrom> for Uniform { } /// Helper trait similar to [`Borrow`] but implemented -/// only for SampleUniform and references to SampleUniform in -/// order to resolve ambiguity issues. +/// only for [`SampleUniform`] and references to [`SampleUniform`] +/// in order to resolve ambiguity issues. /// /// [`Borrow`]: std::borrow::Borrow pub trait SampleBorrow { diff --git a/src/seq/index.rs b/src/seq/index.rs index 471e87c1e2..709d62c86b 100644 --- a/src/seq/index.rs +++ b/src/seq/index.rs @@ -339,7 +339,7 @@ where /// which will be called once for each index. /// /// This implementation uses the algorithm described by Efraimidis and Spirakis -/// in this paper: https://doi.org/10.1016/j.ipl.2005.11.003 +/// in this paper: /// It uses `O(length + amount)` space and `O(length)` time. /// /// Error cases: