Update rand to 0.8 (#527)

This commit is contained in:
Paolo Barbolini
2021-01-05 22:02:10 +01:00
committed by GitHub
parent 54cd221de7
commit d8c4a66206
2 changed files with 3 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ tracing = { version = "0.1.16", default-features = false, features = ["std"], op
hyperx = { version = "1", optional = true, features = ["headers"] }
mime = { version = "0.3", optional = true }
uuid = { version = "0.8", features = ["v4"] }
rand = { version = "0.7", optional = true }
rand = { version = "0.8", optional = true }
quoted_printable = { version = "0.4", optional = true }
base64 = { version = "0.13", optional = true }
once_cell = "1"

View File

@@ -198,8 +198,9 @@ pub enum MultiPartKind {
/// Create a random MIME boundary.
fn make_boundary() -> String {
rand::thread_rng()
.sample_iter(&rand::distributions::Alphanumeric)
.sample_iter(rand::distributions::Alphanumeric)
.take(40)
.map(char::from)
.collect()
}