From b8d21712bc185193768e8d9c9af6286e686e4d93 Mon Sep 17 00:00:00 2001 From: Kornel Date: Tue, 12 Jan 2021 17:40:44 +0000 Subject: [PATCH] Upgrade rand --- Cargo.toml | 2 +- src/sampler.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a9a356e..3d9d8aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,5 +21,5 @@ default = [ "stacktrace" ] [dependencies] backtrace = { version = "0.3", optional = true } crossbeam-channel = "0.5" -rand = "0.7" +rand = "0.8.1" trackable = "0.2" diff --git a/src/sampler.rs b/src/sampler.rs index 2d87283..baa5075 100644 --- a/src/sampler.rs +++ b/src/sampler.rs @@ -69,7 +69,7 @@ impl ProbabilisticSampler { } impl Sampler for ProbabilisticSampler { fn is_sampled(&self, _span: &CandidateSpan) -> bool { - rand::thread_rng().gen_range(0.0, 1.0) < self.sampling_rate + rand::thread_rng().gen_range(0.0..1.0) < self.sampling_rate } }