You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by hs...@apache.org on 2023/06/08 07:30:40 UTC

[incubator-teaclave-sgx-sdk] branch v2.0.0-preview updated: Remove cargo doc warnings

This is an automated email from the ASF dual-hosted git repository.

hsun pushed a commit to branch v2.0.0-preview
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git


The following commit(s) were added to refs/heads/v2.0.0-preview by this push:
     new 0eef86cc Remove cargo doc warnings
0eef86cc is described below

commit 0eef86cc85d30f719cbecc56051b3cb40bbe911e
Author: sunhe05 <su...@baidu.com>
AuthorDate: Thu Jun 8 07:30:16 2023 +0000

    Remove cargo doc warnings
---
 sgx_rand/src/chacha.rs                    | 4 ++--
 sgx_rand/src/distributions/exponential.rs | 4 ++--
 sgx_rand/src/distributions/gamma.rs       | 6 +++---
 sgx_rand/src/distributions/normal.rs      | 4 ++--
 sgx_rand/src/isaac.rs                     | 8 ++++----
 sgx_rand/src/lib.rs                       | 8 ++++----
 6 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/sgx_rand/src/chacha.rs b/sgx_rand/src/chacha.rs
index 157bb3db..8c86b4fa 100644
--- a/sgx_rand/src/chacha.rs
+++ b/sgx_rand/src/chacha.rs
@@ -24,14 +24,14 @@ const KEY_WORDS: usize = 8; // 8 words for the 256-bit key
 const STATE_WORDS: usize = 16;
 const CHACHA_ROUNDS: u32 = 20; // Cryptographically secure from 8 upwards as of this writing
 
-/// A random number generator that uses the ChaCha20 algorithm [1].
+/// A random number generator that uses the ChaCha20 algorithm \[1\].
 ///
 /// The ChaCha algorithm is widely accepted as suitable for
 /// cryptographic purposes, but this implementation has not been
 /// verified as such. Prefer a generator like `OsRng` that defers to
 /// the operating system for cases that need high security.
 ///
-/// [1]: D. J. Bernstein, [*ChaCha, a variant of
+/// \[1\]: D. J. Bernstein, [*ChaCha, a variant of
 /// Salsa20*](http://cr.yp.to/chacha.html)
 #[derive(Copy, Clone, Debug)]
 pub struct ChaChaRng {
diff --git a/sgx_rand/src/distributions/exponential.rs b/sgx_rand/src/distributions/exponential.rs
index 219f959a..cccffaac 100644
--- a/sgx_rand/src/distributions/exponential.rs
+++ b/sgx_rand/src/distributions/exponential.rs
@@ -24,11 +24,11 @@ use crate::{Rand, Rng};
 ///
 /// See `Exp` for the general exponential distribution.
 ///
-/// Implemented via the ZIGNOR variant[1] of the Ziggurat method. The
+/// Implemented via the ZIGNOR variant\[1\] of the Ziggurat method. The
 /// exact description in the paper was adjusted to use tables for the
 /// exponential distribution rather than normal.
 ///
-/// [1]: Jurgen A. Doornik (2005). [*An Improved Ziggurat Method to
+/// \[1\]: Jurgen A. Doornik (2005). [*An Improved Ziggurat Method to
 /// Generate Normal Random
 /// Samples*](http://www.doornik.com/research/ziggurat.pdf). Nuffield
 /// College, Oxford
diff --git a/sgx_rand/src/distributions/gamma.rs b/sgx_rand/src/distributions/gamma.rs
index a3df4cf0..07d0a810 100644
--- a/sgx_rand/src/distributions/gamma.rs
+++ b/sgx_rand/src/distributions/gamma.rs
@@ -35,9 +35,9 @@ use crate::{Open01, Rng};
 /// where `Γ` is the Gamma function, `k` is the shape and `θ` is the
 /// scale and both `k` and `θ` are strictly positive.
 ///
-/// The algorithm used is that described by Marsaglia & Tsang 2000[1],
+/// The algorithm used is that described by Marsaglia & Tsang 2000\[1\],
 /// falling back to directly sampling from an Exponential for `shape
-/// == 1`, and using the boosting technique described in [1] for
+/// == 1`, and using the boosting technique described in \[1\] for
 /// `shape < 1`.
 ///
 /// # Example
@@ -50,7 +50,7 @@ use crate::{Open01, Rng};
 /// println!("{} is from a Gamma(2, 5) distribution", v);
 /// ```
 ///
-/// [1]: George Marsaglia and Wai Wan Tsang. 2000. "A Simple Method
+/// \[1\]: George Marsaglia and Wai Wan Tsang. 2000. "A Simple Method
 /// for Generating Gamma Variables" *ACM Trans. Math. Softw.* 26, 3
 /// (September 2000),
 /// 363-372. DOI:[10.1145/358407.358414](http://doi.acm.org/10.1145/358407.358414)
diff --git a/sgx_rand/src/distributions/normal.rs b/sgx_rand/src/distributions/normal.rs
index 443a6764..a61f18e4 100644
--- a/sgx_rand/src/distributions/normal.rs
+++ b/sgx_rand/src/distributions/normal.rs
@@ -24,9 +24,9 @@ use crate::{Open01, Rand, Rng};
 ///
 /// See `Normal` for the general normal distribution.
 ///
-/// Implemented via the ZIGNOR variant[1] of the Ziggurat method.
+/// Implemented via the ZIGNOR variant\[1\] of the Ziggurat method.
 ///
-/// [1]: Jurgen A. Doornik (2005). [*An Improved Ziggurat Method to
+/// \[1\]: Jurgen A. Doornik (2005). [*An Improved Ziggurat Method to
 /// Generate Normal Random
 /// Samples*](http://www.doornik.com/research/ziggurat.pdf). Nuffield
 /// College, Oxford
diff --git a/sgx_rand/src/isaac.rs b/sgx_rand/src/isaac.rs
index b25c40ac..0ca7194e 100644
--- a/sgx_rand/src/isaac.rs
+++ b/sgx_rand/src/isaac.rs
@@ -30,14 +30,14 @@ const RAND_SIZE_LEN: usize = 8;
 const RAND_SIZE: u32 = 1 << RAND_SIZE_LEN;
 const RAND_SIZE_USIZE: usize = 1 << RAND_SIZE_LEN;
 
-/// A random number generator that uses the ISAAC algorithm[1].
+/// A random number generator that uses the ISAAC algorithm\[1\].
 ///
 /// The ISAAC algorithm is generally accepted as suitable for
 /// cryptographic purposes, but this implementation has not be
 /// verified as such. Prefer a generator like `OsRng` that defers to
 /// the operating system for cases that need high security.
 ///
-/// [1]: Bob Jenkins, [*ISAAC: A fast cryptographic random number
+/// \[1\]: Bob Jenkins, [*ISAAC: A fast cryptographic random number
 /// generator*](http://www.burtleburtle.net/bob/rand/isaacafa.html)
 #[derive(Copy)]
 pub struct IsaacRng {
@@ -309,7 +309,7 @@ impl fmt::Debug for IsaacRng {
 const RAND_SIZE_64_LEN: usize = 8;
 const RAND_SIZE_64: usize = 1 << RAND_SIZE_64_LEN;
 
-/// A random number generator that uses ISAAC-64[1], the 64-bit
+/// A random number generator that uses ISAAC-64\[1\], the 64-bit
 /// variant of the ISAAC algorithm.
 ///
 /// The ISAAC algorithm is generally accepted as suitable for
@@ -317,7 +317,7 @@ const RAND_SIZE_64: usize = 1 << RAND_SIZE_64_LEN;
 /// verified as such. Prefer a generator like `OsRng` that defers to
 /// the operating system for cases that need high security.
 ///
-/// [1]: Bob Jenkins, [*ISAAC: A fast cryptographic random number
+/// \[1\]: Bob Jenkins, [*ISAAC: A fast cryptographic random number
 /// generator*](http://www.burtleburtle.net/bob/rand/isaacafa.html)
 #[derive(Copy)]
 pub struct Isaac64Rng {
diff --git a/sgx_rand/src/lib.rs b/sgx_rand/src/lib.rs
index 462c5ff9..9ed62063 100644
--- a/sgx_rand/src/lib.rs
+++ b/sgx_rand/src/lib.rs
@@ -144,8 +144,8 @@ pub trait Rng {
     /// See:
     /// A PRNG specialized in double precision floating point numbers using
     /// an affine transition
-    /// http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/dSFMT.pdf
-    /// http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-slide-e.pdf
+    /// <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/dSFMT.pdf>
+    /// <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-slide-e.pdf>
     ///
     /// By default this is implemented in terms of `next_u32`, but a
     /// random number generator which can generate numbers satisfying
@@ -535,14 +535,14 @@ pub trait SeedableRng<Seed>: Rng {
     fn from_seed(seed: Seed) -> Self;
 }
 
-/// An Xorshift[1] random number
+/// An Xorshift\[1\] random number
 /// generator.
 ///
 /// The Xorshift algorithm is not suitable for cryptographic purposes
 /// but is very fast. If you do not know for sure that it fits your
 /// requirements, use a more secure one such as `IsaacRng` or `RdRand`.
 ///
-/// [1]: Marsaglia, George (July 2003). ["Xorshift
+/// \[1\]: Marsaglia, George (July 2003). ["Xorshift
 /// RNGs"](http://www.jstatsoft.org/v08/i14/paper). *Journal of
 /// Statistical Software*. Vol. 8 (Issue 14).
 #[allow(missing_copy_implementations)]


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org