mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 05:45:19 +01:00
Fix race condition in calculate_now (#860)
* Fix race condition in calculate_now * Add changelog * Update changelog * Refine comment * More comment fixes
This commit is contained in:
parent
f377471e44
commit
bbed945285
8 changed files with 27 additions and 15 deletions
|
|
@ -5,7 +5,7 @@ macro_rules! do_test_u8 {
|
|||
let periods: u32 = $periods;
|
||||
let counter: u8 = $counter;
|
||||
let expected: u32 = $expected;
|
||||
let actual: u32 = calculate_now(periods, || counter);
|
||||
let actual: u32 = calculate_now(|| periods, || counter);
|
||||
assert_eq!(
|
||||
actual, expected,
|
||||
"Expected: ({} | {}) => {}, got: {}",
|
||||
|
|
@ -19,7 +19,7 @@ macro_rules! do_test_u16 {
|
|||
let periods: u16 = $periods;
|
||||
let counter: u16 = $counter;
|
||||
let expected: u32 = $expected;
|
||||
let actual: u32 = calculate_now(periods, || counter);
|
||||
let actual: u32 = calculate_now(|| periods, || counter);
|
||||
assert_eq!(
|
||||
actual, expected,
|
||||
"Expected: ({} | {}) => {}, got: {}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue