From 9d45e786bbac67a5fec0b1cd4653997d84dba4e4 Mon Sep 17 00:00:00 2001 From: Jeb Rosen Date: Sun, 28 Feb 2021 16:18:37 -0800 Subject: [PATCH] Update 'rand' dependency to 0.8. --- core/lib/Cargo.toml | 2 +- examples/pastebin/Cargo.toml | 2 +- examples/todo/Cargo.toml | 2 +- examples/todo/src/tests.rs | 2 +- site/guide/10-pastebin.md | 2 +- site/tests/Cargo.toml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/lib/Cargo.toml b/core/lib/Cargo.toml index c9efc336..0a545bb2 100644 --- a/core/lib/Cargo.toml +++ b/core/lib/Cargo.toml @@ -42,7 +42,7 @@ parking_lot = "0.11" ubyte = {version = "0.10", features = ["serde"] } serde = { version = "1.0", features = ["derive"] } figment = { version = "0.10.2", features = ["toml", "env"] } -rand = "0.7" +rand = "0.8" either = "1" [dependencies.tokio] diff --git a/examples/pastebin/Cargo.toml b/examples/pastebin/Cargo.toml index ffd1adc7..7b62d5a5 100644 --- a/examples/pastebin/Cargo.toml +++ b/examples/pastebin/Cargo.toml @@ -7,4 +7,4 @@ publish = false [dependencies] rocket = { path = "../../core/lib" } -rand = "0.7" +rand = "0.8" diff --git a/examples/todo/Cargo.toml b/examples/todo/Cargo.toml index e2c8a0b3..4f9975fc 100644 --- a/examples/todo/Cargo.toml +++ b/examples/todo/Cargo.toml @@ -15,7 +15,7 @@ log = "0.4" [dev-dependencies] parking_lot = "0.11" -rand = "0.7" +rand = "0.8" [dependencies.rocket_contrib] path = "../../contrib/lib" diff --git a/examples/todo/src/tests.rs b/examples/todo/src/tests.rs index 564696eb..06ac3744 100644 --- a/examples/todo/src/tests.rs +++ b/examples/todo/src/tests.rs @@ -95,7 +95,7 @@ fn test_many_insertions() { for i in 0..ITER { // Issue a request to insert a new task with a random description. - let desc: String = thread_rng().sample_iter(&Alphanumeric).take(12).collect(); + let desc: String = thread_rng().sample_iter(&Alphanumeric).take(12).map(char::from).collect(); client.post("/todo") .header(ContentType::Form) .body(format!("description={}", desc)) diff --git a/site/guide/10-pastebin.md b/site/guide/10-pastebin.md index 5ddb9296..e278bd76 100644 --- a/site/guide/10-pastebin.md +++ b/site/guide/10-pastebin.md @@ -183,7 +183,7 @@ Finally, add a dependency for the `rand` crate to the `Cargo.toml` file: ```toml [dependencies] # existing Rocket dependencies... -rand = "0.6" +rand = "0.8" ``` Then, ensure that your application builds with the new code: diff --git a/site/tests/Cargo.toml b/site/tests/Cargo.toml index bf92e5ca..b6a0acd2 100644 --- a/site/tests/Cargo.toml +++ b/site/tests/Cargo.toml @@ -10,5 +10,5 @@ rocket = { path = "../../core/lib", features = ["secrets"] } doc-comment = "0.3" rocket_contrib = { path = "../../contrib/lib", features = ["json", "tera_templates", "diesel_sqlite_pool"] } serde = { version = "1.0", features = ["derive"] } -rand = "0.7" +rand = "0.8" figment = { version = "0.10", features = ["toml", "env"] }