🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

fastrand

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastrand - cargo Package Compare versions

Comparing version
2.0.0
to
2.0.1
+1
-1
.cargo_vcs_info.json
{
"git": {
"sha1": "6315dd1907b735a0b7585dd1d84d0f50b21f40b5"
"sha1": "387e3baead884a504d98e89bb4316db98f5c15ce"
},
"path_in_vcs": ""
}

@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO

name = "fastrand"
version = "2.0.0"
version = "2.0.1"
authors = ["Stjepan Glavina <stjepang@gmail.com>"]

@@ -19,0 +19,0 @@ exclude = ["/.*"]

@@ -0,1 +1,6 @@

# Version 2.0.1
- Clarify documentation for the `fork()` method. (#62)
- Mention `fastrand-contrib` in documentation. (#70)
# Version 2.0.0

@@ -2,0 +7,0 @@

@@ -86,2 +86,4 @@ # fastrand

This crate aims to expose a core set of useful randomness primitives. For more niche algorithms, consider using the [`fastrand-contrib`] crate alongside this one.
# Features

@@ -91,4 +93,7 @@

generator and global entropy. Without this feature, [`Rng`] can only be instantiated using
the [`with_seed`](Rng::with_seed) method.
the [`with_seed`](https://docs.rs/fastrand/latest/fastrand/struct.Rng.html#method.with_seed) method.
- `js`: Assumes that WebAssembly targets are being run in a JavaScript environment.
[`fastrand-contrib`]: https://crates.io/crates/fastrand-contrib
## License

@@ -95,0 +100,0 @@

@@ -76,2 +76,5 @@ //! A simple and fast random number generator.

//!
//! This crate aims to expose a core set of useful randomness primitives. For more niche algorithms,
//! consider using the [`fastrand-contrib`] crate alongside this one.
//!
//! # Features

@@ -96,2 +99,3 @@ //!

//!
//! [`fastrand-contrib`]: https://crates.io/crates/fastrand-contrib
//! [`getrandom`]: https://crates.io/crates/getrandom

@@ -103,2 +107,8 @@

#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
#![doc(
html_favicon_url = "https://raw.githubusercontent.com/smol-rs/smol/master/assets/images/logo_fullsize_transparent.png"
)]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/smol-rs/smol/master/assets/images/logo_fullsize_transparent.png"
)]

@@ -289,2 +299,6 @@ #[cfg(feature = "alloc")]

///
/// This function can be used to create a new generator that is a "spinoff" of the old
/// generator. The new generator will not produce the same sequence of values as the
/// old generator.
///
/// # Example

@@ -294,14 +308,13 @@ ///

/// // Seed two generators equally, and clone both of them.
/// let mut base1 = fastrand::Rng::new();
/// base1.seed(0x4d595df4d0f33173);
/// let mut base1 = fastrand::Rng::with_seed(0x4d595df4d0f33173);
/// base1.bool(); // Use the generator once.
///
/// let mut base2 = fastrand::Rng::new();
/// base2.seed(0x4d595df4d0f33173);
/// let mut base2 = fastrand::Rng::with_seed(0x4d595df4d0f33173);
/// base2.bool(); // Use the generator once.
///
/// let mut rng1 = base1.clone();
/// let mut rng2 = base2.clone();
/// let mut rng1 = base1.fork();
/// let mut rng2 = base2.fork();
///
/// assert_eq!(rng1.u64(..), rng2.u64(..), "the cloned generators are identical");
/// println!("rng1 returns {}", rng1.u32(..));
/// println!("rng2 returns {}", rng2.u32(..));
/// ```

@@ -308,0 +321,0 @@ #[inline]

Sorry, the diff of this file is not supported yet