Index: nanoid/Cargo.toml
===================================================================
--- nanoid.orig/Cargo.toml
+++ nanoid/Cargo.toml
@@ -48,7 +48,7 @@ name = "nanoid"
 path = "src/lib.rs"
 
 [dependencies.rand]
-version = "0.9"
+version = "0.10"
 
 [dependencies.smartstring]
 version = "1.0.1"
Index: nanoid/README.md
===================================================================
--- nanoid.orig/README.md
+++ nanoid/README.md
@@ -131,7 +131,7 @@ This is useful for testing or when you n
 
 ```rust
 use nanoid::nanoid;
-use rand::{rngs::StdRng, Rng, SeedableRng};
+use rand::{rngs::StdRng, Rng, SeedableRng, RngExt};
 
 fn main() {
     let mut rng = StdRng::seed_from_u64(42);
Index: nanoid/src/rngs.rs
===================================================================
--- nanoid.orig/src/rngs.rs
+++ nanoid/src/rngs.rs
@@ -1,10 +1,9 @@
 use rand::{
-    rngs::{SmallRng, StdRng},
-    Rng, SeedableRng,
+    rngs::ThreadRng, RngExt, SeedableRng, rngs::StdRng,
 };
 
 pub fn default(size: usize) -> Vec<u8> {
-    let mut rng = StdRng::from_os_rng();
+    let mut rng = ThreadRng::default();
     let mut result: Vec<u8> = vec![0; size];
 
     rng.fill(&mut result[..]);
@@ -25,7 +24,7 @@ mod test_default {
 }
 
 pub fn non_secure(size: usize) -> Vec<u8> {
-    let mut rng = SmallRng::from_os_rng();
+    let mut rng = ThreadRng::default();
     let mut result = vec![0u8; size];
 
     rng.fill(&mut result[..]);
Index: nanoid/src/lib.rs
===================================================================
--- nanoid.orig/src/lib.rs
+++ nanoid/src/lib.rs
@@ -121,7 +121,7 @@
 //!
 //! ```rust
 //! use nanoid::nanoid;
-//! use rand::{rngs::StdRng, Rng, SeedableRng};
+//! use rand::{rngs::StdRng, Rng, SeedableRng, RngExt};
 //!
 //! let mut rng = StdRng::seed_from_u64(42);
 //!
