Skip to content

Commit

Permalink
Re-run cargo fmt and fix lib::test_components test
Browse files Browse the repository at this point in the history
  • Loading branch information
Qqwy committed Feb 24, 2024
1 parent d1ffe60 commit 9502781
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ mod tests {
#[test]
fn test_components() {
let mut components = Components::new(0);
assert_eq!(components.sequence(), 0);
assert_eq!(components.sequence(), 1);
assert_eq!(components.timestamp(), 0);

components.set_sequence(1024);
Expand Down
5 changes: 4 additions & 1 deletion src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,10 @@ where
F: Fn(),
{
loop {
println!("Waiting until the next millisecond from {}", last_millisecond);
println!(
"Waiting until the next millisecond from {}",
last_millisecond
);
let now = epoch.elapsed().as_millis() as u64;
if now > last_millisecond {
return now;
Expand Down

0 comments on commit 9502781

Please sign in to comment.