Skip to content

Commit

Permalink
Upgrade to rand 0.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelbuesing committed Oct 18, 2018
1 parent cc4b068 commit e9a25a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ unix_socket = "0.4.3"
rustc-serialize = "0.3"
libc = "0.2"
dbus-serialize = "0.1"
rand = "0.3"
rand = "0.5"
rust-crypto = "0.2.31"
5 changes: 3 additions & 2 deletions src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ use std::cell::RefCell;
use std::str::FromStr;
use std::string;
use std::num::ParseIntError;
use rand::Rand;
use rand;
use rand::prelude::*;
use libc;
use crypto::digest::Digest;
use crypto;
Expand Down Expand Up @@ -286,8 +286,9 @@ impl Connection {
let cookie = try!(get_cookie(words[0], words[1]));

let mut my_challenge = Vec::new();
let mut rng = rand::thread_rng();
for _ in 0..16 {
my_challenge.push(u8::rand(&mut rand::thread_rng()));
my_challenge.push(rng.gen());
}
let hex_challenge = my_challenge.to_hex();

Expand Down

0 comments on commit e9a25a3

Please sign in to comment.