Rocket

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 1d1d5259ad8b60f2fd17455d6e2957f763e67ea5
parent aaad4f5c57bd4b4dcf8e564adabcf0d5aba46161
Author: jeb <jeb@jebrosen.com>
Date:   Wed, 25 Jul 2018 09:01:29 -0600

Fix compatibility warnings and errors in examples.

Diffstat:
Mexamples/managed_queue/Cargo.toml | 2+-
Mexamples/managed_queue/src/main.rs | 2+-
Mexamples/todo/src/tests.rs | 4++--
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/managed_queue/Cargo.toml b/examples/managed_queue/Cargo.toml @@ -5,6 +5,6 @@ workspace = "../.." publish = false [dependencies] -crossbeam = "*" +crossbeam = "0.4" rocket = { path = "../../core/lib" } rocket_codegen = { path = "../../core/codegen" } diff --git a/examples/managed_queue/src/main.rs b/examples/managed_queue/src/main.rs @@ -6,7 +6,7 @@ extern crate rocket; #[cfg(test)] mod tests; -use crossbeam::sync::MsQueue; +use crossbeam::queue::MsQueue; use rocket::State; #[derive(FromForm, Debug)] diff --git a/examples/todo/src/tests.rs b/examples/todo/src/tests.rs @@ -3,7 +3,7 @@ extern crate rand; use super::task::Task; use self::parking_lot::Mutex; -use self::rand::{Rng, thread_rng}; +use self::rand::{Rng, thread_rng, distributions::Alphanumeric}; use rocket::local::Client; use rocket::http::{Status, ContentType}; @@ -90,7 +90,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 = rng.gen_ascii_chars().take(12).collect(); + let desc: String = rng.sample_iter(&Alphanumeric).take(12).collect(); client.post("/todo") .header(ContentType::Form) .body(format!("description={}", desc))