Skip to content

Commit 33b13d0

Browse files
committed
style: apply cargo +nightly fmt
1 parent c267907 commit 33b13d0

1 file changed

Lines changed: 22 additions & 16 deletions

File tree

rclrs/src/executor/tokio_executor.rs

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,29 @@
2121
//! Code that needs work confined to spinning should put it in an entity callback
2222
//! rather than a spawned task.
2323
24-
use std::any::Any;
25-
use std::collections::HashMap;
26-
use std::panic::AssertUnwindSafe;
27-
use std::sync::{
28-
atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering},
29-
Arc, Mutex,
24+
use std::{
25+
any::Any,
26+
collections::HashMap,
27+
panic::AssertUnwindSafe,
28+
sync::{
29+
atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering},
30+
Arc, Mutex,
31+
},
32+
time::{Duration, Instant},
3033
};
31-
use std::time::{Duration, Instant};
3234

3335
use futures::future::BoxFuture;
3436
use tokio::sync::{
3537
mpsc::{UnboundedReceiver, UnboundedSender},
3638
watch, Notify,
3739
};
3840

39-
use crate::rcl_bindings::{rcl_timer_get_time_until_next_call, rcl_timer_is_ready, rcl_timer_t};
4041
use crate::{
41-
log_error, Context, ExecutorChannel, ExecutorRuntime, ExecutorWorkerOptions, OnReadyHandle,
42-
PayloadTask, RclReturnCode, RclrsError, ReadyKind, SpinConditions, ToResult, Waitable,
43-
WeakActivityListener, WorkerChannel,
42+
log_error,
43+
rcl_bindings::{rcl_timer_get_time_until_next_call, rcl_timer_is_ready, rcl_timer_t},
44+
Context, ExecutorChannel, ExecutorRuntime, ExecutorWorkerOptions, OnReadyHandle, PayloadTask,
45+
RclReturnCode, RclrsError, ReadyKind, SpinConditions, ToResult, Waitable, WeakActivityListener,
46+
WorkerChannel,
4447
};
4548

4649
use super::Executor;
@@ -1002,11 +1005,14 @@ impl CreateTokioExecutor for Context {
10021005
#[cfg(test)]
10031006
mod tests {
10041007
use crate::*;
1005-
use ros_env::test_msgs;
1006-
use ros_env::test_msgs::msg;
1007-
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
1008-
use std::sync::Arc;
1009-
use std::time::{Duration, Instant};
1008+
use ros_env::{test_msgs, test_msgs::msg};
1009+
use std::{
1010+
sync::{
1011+
atomic::{AtomicBool, AtomicUsize, Ordering},
1012+
Arc,
1013+
},
1014+
time::{Duration, Instant},
1015+
};
10101016

10111017
/// The executor can adopt the current Tokio runtime (the `#[tokio::main]`
10121018
/// pattern) instead of owning one, and deliver messages while driven by

0 commit comments

Comments
 (0)