Skip to content

Commit d112672

Browse files
authored
RUST-996 Update to rand = "0.8" (#290)
1 parent 45aab7e commit d112672

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ name = "bson"
4646
[dependencies]
4747
ahash = "0.7.2"
4848
chrono = "0.4.15"
49-
rand = "0.7"
49+
rand = "0.8"
5050
serde = { version = "1.0", features = ["derive"] }
5151
serde_json = { version = "1.0", features = ["preserve_order"] }
5252
indexmap = "1.6.2"

src/oid.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const COUNTER_OFFSET: usize = PROCESS_ID_OFFSET + PROCESS_ID_SIZE;
2626
const MAX_U24: usize = 0xFF_FFFF;
2727

2828
lazy_static! {
29-
static ref OID_COUNTER: AtomicUsize = AtomicUsize::new(thread_rng().gen_range(0, MAX_U24 + 1));
29+
static ref OID_COUNTER: AtomicUsize = AtomicUsize::new(thread_rng().gen_range(0..=MAX_U24));
3030
}
3131

3232
/// Errors that can occur during [`ObjectId`] construction and generation.

0 commit comments

Comments
 (0)