Skip to content

Commit e7496ba

Browse files
committed
chore
1 parent 2de64a5 commit e7496ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ extern crate alloc;
4141
#[cfg(feature = "alloc")]
4242
use alloc::sync::Arc;
4343

44-
use rand::TryRngCore;
4544
use rustls::crypto::{
4645
CipherSuiteCommon, CryptoProvider, GetRandomFailed, KeyProvider, SecureRandom,
4746
};
@@ -65,6 +64,7 @@ pub fn provider() -> CryptoProvider {
6564

6665
impl SecureRandom for Provider {
6766
fn fill(&self, bytes: &mut [u8]) -> Result<(), GetRandomFailed> {
67+
use rand::TryRngCore;
6868
let mut rng = rand::rngs::SysRng.unwrap_err();
6969
rng.try_fill_bytes(bytes).map_err(|_| GetRandomFailed)
7070
}

0 commit comments

Comments
 (0)