Skip to content

Commit 1eb1acc

Browse files
committed
Format fix.
Signed-off-by: Agustin Alba Chicar <[email protected]>
1 parent 214a991 commit 1eb1acc

File tree

4 files changed

+104
-99
lines changed

4 files changed

+104
-99
lines changed

rclrs/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ mod qos;
1919
mod service;
2020
mod subscription;
2121
mod time;
22-
mod timer;
2322
mod time_source;
23+
mod timer;
2424
mod vendor;
2525
mod wait;
2626

@@ -49,8 +49,8 @@ pub use rcl_bindings::rmw_request_id_t;
4949
pub use service::*;
5050
pub use subscription::*;
5151
pub use time::*;
52-
pub use timer::*;
5352
use time_source::*;
53+
pub use timer::*;
5454
pub use wait::*;
5555

5656
/// Polls the node for new messages and executes the corresponding callbacks.

rclrs/src/node.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use crate::{
1616
rcl_bindings::*, Client, ClientBase, Clock, Context, ContextHandle, GuardCondition, LogParams,
1717
Logger, ParameterBuilder, ParameterInterface, ParameterVariant, Parameters, Publisher,
1818
QoSProfile, RclrsError, Service, ServiceBase, Subscription, SubscriptionBase,
19-
SubscriptionCallback, Timer, TimerCallback, TimeSource, ToLogParams, ENTITY_LIFECYCLE_MUTEX,
19+
SubscriptionCallback, TimeSource, Timer, TimerCallback, ToLogParams, ENTITY_LIFECYCLE_MUTEX,
2020
};
2121

2222
/// Constant conversion from seconds to nanoseconds
@@ -350,15 +350,18 @@ impl Node {
350350
period_ns: i64,
351351
context: &Context,
352352
callback: Option<TimerCallback>,
353-
clock: Option<Clock>
353+
clock: Option<Clock>,
354354
) -> Result<Arc<Timer>, RclrsError> {
355355
let clock_used = match clock {
356356
Some(value) => value,
357357
None => self.get_clock(),
358358
};
359359
let timer = Timer::new_with_callback(&clock_used, &context, period_ns, callback)?;
360360
let timer = Arc::new(timer);
361-
self.timers_mtx.lock().unwrap().push(Arc::downgrade(&timer) as Weak<Timer>);
361+
self.timers_mtx
362+
.lock()
363+
.unwrap()
364+
.push(Arc::downgrade(&timer) as Weak<Timer>);
362365
Ok(timer)
363366
}
364367

0 commit comments

Comments
 (0)