diff --git a/Cargo.toml b/Cargo.toml
index 5441fed..a14edf7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -27,7 +27,7 @@ optional = true
 version = "0.10"
 
 [dev-dependencies.rand]
-version = "0.4"
+version = "0.8"
 
 [dev-dependencies.serde_json]
 version = "1.0"
diff --git a/src/lib.rs b/src/lib.rs
index 48692a2..ee69c9e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -731,6 +731,7 @@ mod tests {
     #[test]
     fn spray_and_pray() {
         use self::rand::Rng;
+        use self::rand::RngCore;
 
         let mut rng = rand::thread_rng();
         let mut m = Sha1::new();
