Commit graph

4 commits

Author SHA1 Message Date
David Tolnay
a5aa8239a5 clippy: Resolve const_static_lifetime
TEST=bin/clippy

Change-Id: I51453ae1a6b6c6bf9c105a41352fd95500f76b05
Reviewed-on: https://chromium-review.googlesource.com/1566662
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2019-04-17 17:22:50 -07:00
David Tolnay
fa08830758 edition: Update rand_ish crate to 2018 edition
Separated out of CL:1513058 to make it possible to land parts
individually while the affected crate has no other significant CLs
pending. This avoids repeatedly introducing non-textual conflicts with
new code that adds `use` statements.

TEST=cargo check
TEST=cargo check --all-features
TEST=cargo check --target aarch64-unknown-linux-gnu

Change-Id: Ibbb85c0b705adadc9cfd671a16f48dd29643acee
Reviewed-on: https://chromium-review.googlesource.com/1519705
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: David Tolnay <dtolnay@chromium.org>
2019-04-07 23:24:28 -07:00
Zach Reizner
2a2e2587b1 rand_ish: prevent spaces in urandom_str and use uniform samples only
TEST=cargo test -p rand_ish
BUG=None

Change-Id: I8e91be856c3bc9148dc373c7bc2cf6c8731cb0d3
Reviewed-on: https://chromium-review.googlesource.com/1553563
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Daniel Prilik <prilik@google.com>
Reviewed-by: David Tolnay <dtolnay@chromium.org>
2019-04-05 03:53:19 -07:00
Daniel Prilik
2200604d9c remove rand crate
the few uses of rand::thread_rng() have been replaced with either
prngs or reads from /dev/urandom. the implementations are under
the `rand_ish` minicrate.

`protoc-rust` depends on `tempdir`, which relies on rand, so
`tempdir` has been patched with a rewritten version that does not
have rand as a dependency.

BUG=chromium:921795
TEST=cargo test --features plugin

Change-Id: I6f1c7d7a1aeef4dd55ac71e58294d16c291b8871
Reviewed-on: https://chromium-review.googlesource.com/1409705
Commit-Ready: Daniel Prilik <prilik@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2019-01-17 20:20:50 -08:00