Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tls = ["openssl"]
[dependencies]
byteorder = "1"
url = "^2.1"
rand = "0.8"
rand = "0.9"
enum_dispatch = "0.3"
openssl = { version = "^0.10", optional = true }
r2d2 = "^0.8"
11 changes: 3 additions & 8 deletions tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
extern crate memcache;
extern crate rand;

use rand::distributions::Alphanumeric;
use rand::{Rng, thread_rng};
use std::iter;
use rand::distr::{Alphanumeric, SampleString};
use rand::rng;
use std::thread;
use std::thread::JoinHandle;
use std::time;

fn gen_random_key() -> String {
let bs = iter::repeat(())
.map(|()| thread_rng().sample(Alphanumeric))
.take(10)
.collect::<Vec<u8>>();
return String::from_utf8(bs).unwrap();
Alphanumeric.sample_string(&mut rng(), 10)
}

#[test]
Expand Down
Loading