]> git.proxmox.com Git - cargo.git/blobdiff - vendor/rand_core/src/os.rs
New upstream version 0.52.0
[cargo.git] / vendor / rand_core / src / os.rs
index fc23a57d960e39f09999d7eb249f03b4becdb141..6cd1b9cf5dec5123a48e84337ba64529aaf096f5 100644 (file)
@@ -7,12 +7,11 @@
 // except according to those terms.
 
 //! Interface to the random number generator of the operating system.
-// Note: keep this code in sync with the rand_os crate!
 
+use crate::{impls, CryptoRng, Error, RngCore};
 use getrandom::getrandom;
-use crate::{CryptoRng, RngCore, Error, impls};
 
-/// A random number generator that retrieves randomness from from the
+/// A random number generator that retrieves randomness from the
 /// operating system.
 ///
 /// This is a zero-sized struct. It can be freely constructed with `OsRng`.
@@ -44,6 +43,7 @@ use crate::{CryptoRng, RngCore, Error, impls};
 /// ```
 ///
 /// [getrandom]: https://crates.io/crates/getrandom
+#[cfg_attr(doc_cfg, doc(cfg(feature = "getrandom")))]
 #[derive(Clone, Copy, Debug, Default)]
 pub struct OsRng;