We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8af70d commit 1c34c14Copy full SHA for 1c34c14
password-hash/src/salt.rs
@@ -197,7 +197,8 @@ impl SaltString {
197
/// Generate a random B64-encoded [`SaltString`] from [`CryptoRng`].
198
#[cfg(feature = "rand_core")]
199
pub fn from_rng<R: CryptoRng + ?Sized>(rng: &mut R) -> Self {
200
- Self::try_from_rng(rng).expect("RNG failure")
+ let Ok(out) = Self::try_from_rng(rng);
201
+ out
202
}
203
204
/// Generate a random B64-encoded [`SaltString`] from [`TryCryptoRng`].
0 commit comments