Skip to content

Commit

Permalink
Fix compatibility warnings and errors in examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
jebrosen committed Jul 25, 2018
1 parent aaad4f5 commit 1d1d525
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/managed_queue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ workspace = "../.."
publish = false

[dependencies]
crossbeam = "*"
crossbeam = "0.4"
rocket = { path = "../../core/lib" }
rocket_codegen = { path = "../../core/codegen" }
2 changes: 1 addition & 1 deletion examples/managed_queue/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions examples/todo/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 1d1d525

Please sign in to comment.