From d8c4a662067db349af5a28eb5c13957ce3b78ea8 Mon Sep 17 00:00:00 2001 From: Paolo Barbolini Date: Tue, 5 Jan 2021 22:02:10 +0100 Subject: [PATCH] Update rand to 0.8 (#527) --- Cargo.toml | 2 +- src/message/mimebody.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9918675..e6b7ac6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/message/mimebody.rs b/src/message/mimebody.rs index 1fb0033..10ea5bc 100644 --- a/src/message/mimebody.rs +++ b/src/message/mimebody.rs @@ -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() }