Address Clippy lints

This commit is contained in:
Tim Kuehn
2018-11-06 17:00:15 -08:00
parent 2c7c64841f
commit 4d2d3f24c6
7 changed files with 31 additions and 26 deletions

View File

@@ -80,7 +80,7 @@ impl TraceId {
/// Returns a random trace ID that can be assumed to be globally unique if `rng` generates
/// actually-random numbers.
pub fn random<R: Rng>(rng: &mut R) -> Self {
TraceId((rng.next_u64() as u128) << mem::size_of::<u64>() | rng.next_u64() as u128)
TraceId(u128::from(rng.next_u64()) << mem::size_of::<u64>() | u128::from(rng.next_u64()))
}
}