Skip to content

Commit

Permalink
Bump MSRV to 1.51 and use unsigned_abs
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed Nov 20, 2023
1 parent c0093ef commit 69139bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions rand_jitter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ documentation = "https://docs.rs/rand_jitter"
description = "Random number generator based on timing jitter"
keywords = ["random", "rng", "os"]
edition = "2018"
rust-version = "1.51"

[dependencies]
rand_core = { version = "0.6" }
Expand Down
2 changes: 1 addition & 1 deletion rand_jitter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/)
[![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand_jitter)
[![API](https://docs.rs/rand_jitter/badge.svg)](https://docs.rs/rand_jitter)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.36+-lightgray.svg)](https://github.com/rust-random/rngs#rust-version-requirements)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.51-lightgray.svg)](https://github.com/rust-random/rngs#rust-version-requirements)

Non-physical true random number generator based on timing jitter.

Expand Down
2 changes: 1 addition & 1 deletion rand_jitter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ where
// Ensure that we have a varying delta timer which is necessary for
// the calculation of entropy -- perform this check only after the
// first loop is executed as we need to prime the old_delta value
delta_sum += (delta - old_delta).abs() as u64;
delta_sum += (delta - old_delta).unsigned_abs() as u64;
old_delta = delta;
}

Expand Down

0 comments on commit 69139bd

Please sign in to comment.