Skip to content

Commit a2af202

Browse files
committed
Fix formatting
Signed-off-by: Michael X. Grey <[email protected]>
1 parent 4adc857 commit a2af202

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

examples/timer_demo/src/main.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,13 @@ fn main() -> Result<(), RclrsError> {
1010
let node = executor.create_node("timer_demo")?;
1111
let worker = node.create_worker::<usize>(0);
1212
let timer_period = Duration::from_secs(1);
13-
let _timer = worker.create_timer_repeating(
14-
timer_period,
15-
move |count: &mut usize| {
16-
*count += 1;
17-
println!(
18-
"Drinking 🧉 for the {}th time every {:?}.",
19-
*count,
20-
timer_period,
21-
);
22-
}
23-
)?;
13+
let _timer = worker.create_timer_repeating(timer_period, move |count: &mut usize| {
14+
*count += 1;
15+
println!(
16+
"Drinking 🧉 for the {}th time every {:?}.",
17+
*count, timer_period,
18+
);
19+
})?;
2420

2521
executor.spin(SpinOptions::default()).first_error()
2622
}

0 commit comments

Comments
 (0)