Skip to content

Commit

Permalink
Update to rand 0.8.0, closes #440
Browse files Browse the repository at this point in the history
Update to rand_pcg 0.3.0, closes #434
Update to getrandom 0.2.0
  • Loading branch information
iceiix committed Dec 27, 2020
1 parent 8f4883c commit 05cc9f1
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 12 deletions.
159 changes: 151 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Expand Up @@ -28,9 +28,9 @@ serde_json = "1.0.60"
flate2 = { version = "1.0.19", features = ["rust_backend"], default-features = false }
zip = { version = "0.5.6", features = ["deflate"], default-features = false }
image = "0.23.12"
getrandom = { version = "0.1.14", features = ["wasm-bindgen"] }
rand = { version = "0.7.3", default-features = false }
rand_pcg = "0.2.1"
getrandom = { version = "0.2", features = ["js"] }
rand = "0.8.0"
rand_pcg = "0.3.0"
base64 = "0.13.0"
log = { version = "0.4.11", features = ["std"] }
cgmath = "0.17.0"
Expand Down
2 changes: 1 addition & 1 deletion src/screen/login.rs
Expand Up @@ -175,7 +175,7 @@ impl super::Screen for Login {
let mut client_token = self.vars.get(auth::AUTH_CLIENT_TOKEN).clone();
if client_token.is_empty() {
client_token = std::iter::repeat(())
.map(|()| rand::thread_rng().sample(&rand::distributions::Alphanumeric))
.map(|()| rand::thread_rng().sample(&rand::distributions::Alphanumeric) as char)
.take(20)
.collect();
self.vars.set(auth::AUTH_CLIENT_TOKEN, client_token);
Expand Down
1 change: 1 addition & 0 deletions src/screen/server_list.rs
Expand Up @@ -528,6 +528,7 @@ impl super::Screen for ServerList {
let name: String = std::iter::repeat(())
.map(|()| {
rand::thread_rng().sample(&rand::distributions::Alphanumeric)
as char
})
.take(30)
.collect();
Expand Down

0 comments on commit 05cc9f1

Please sign in to comment.