Skip to content

Commit 83cf32c

Browse files
Clear warnings
Signed-off-by: Luca Della Vedova <[email protected]>
1 parent c9a53db commit 83cf32c

File tree

3 files changed

+23
-16
lines changed

3 files changed

+23
-16
lines changed

rclrs/src/dynamic_message/dynamic_subscription.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ where
242242
///
243243
/// Holding onto this sender will keep the subscription task alive. Once
244244
/// this sender is dropped, the subscription task will end itself.
245+
// TODO(luca) Expose an API to update the callback at runtime
246+
#[allow(unused)]
245247
callback: Arc<Mutex<DynamicSubscriptionCallback<Scope::Payload>>>,
246248
/// Holding onto this keeps the waiter for this subscription alive in the
247249
/// wait set of the executor.
@@ -267,7 +269,6 @@ where
267269
node_handle: &Arc<NodeHandle>,
268270
commands: &Arc<WorkerCommands>,
269271
) -> Result<Arc<Self>, RclrsError> {
270-
// TODO(luca) a lot of duplication with nomral, refactor
271272
// This loads the introspection type support library.
272273
let metadata = DynamicMessageMetadata::new(topic_type)?;
273274
let SubscriptionOptions { topic, qos } = options.into();

rclrs/src/node.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@ pub use primitive_options::*;
66

77
mod graph;
88
#[cfg(feature = "dyn_msg")]
9-
use crate::dynamic_message::{
10-
DynamicMessage, DynamicPublisher, DynamicPublisherState, DynamicSubscription,
11-
DynamicSubscriptionState, MessageTypeName, NodeAsyncDynamicSubscriptionCallback,
12-
NodeDynamicSubscriptionCallback,
9+
use crate::{
10+
dynamic_message::{
11+
DynamicMessage, DynamicPublisher, DynamicPublisherState, DynamicSubscription,
12+
DynamicSubscriptionState, MessageTypeName, NodeAsyncDynamicSubscriptionCallback,
13+
NodeDynamicSubscriptionCallback,
14+
},
15+
MessageInfo,
1316
};
17+
#[cfg(feature = "dyn_msg")]
18+
use futures::future::BoxFuture;
1419

1520
pub use graph::*;
1621

17-
use futures::future::BoxFuture;
1822
mod node_graph_task;
1923
use node_graph_task::*;
2024

@@ -39,11 +43,10 @@ use rosidl_runtime_rs::Message;
3943
use crate::{
4044
rcl_bindings::*, Client, ClientOptions, ClientState, Clock, ContextHandle, ExecutorCommands,
4145
IntoAsyncServiceCallback, IntoAsyncSubscriptionCallback, IntoNodeServiceCallback,
42-
IntoNodeSubscriptionCallback, LogParams, Logger, MessageInfo, ParameterBuilder,
43-
ParameterInterface, ParameterVariant, Parameters, Promise, Publisher, PublisherOptions,
44-
PublisherState, RclrsError, Service, ServiceOptions, ServiceState, Subscription,
45-
SubscriptionOptions, SubscriptionState, TimeSource, ToLogParams, Worker, WorkerOptions,
46-
WorkerState, ENTITY_LIFECYCLE_MUTEX,
46+
IntoNodeSubscriptionCallback, LogParams, Logger, ParameterBuilder, ParameterInterface,
47+
ParameterVariant, Parameters, Promise, Publisher, PublisherOptions, PublisherState, RclrsError,
48+
Service, ServiceOptions, ServiceState, Subscription, SubscriptionOptions, SubscriptionState,
49+
TimeSource, ToLogParams, Worker, WorkerOptions, WorkerState, ENTITY_LIFECYCLE_MUTEX,
4750
};
4851

4952
/// A processing unit that can communicate with other nodes. See the API of

rclrs/src/worker.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#[cfg(feature = "dyn_msg")]
2-
use crate::dynamic_message::{
3-
DynamicMessage, DynamicSubscriptionState, MessageTypeName, WorkerDynamicSubscription,
4-
WorkerDynamicSubscriptionCallback,
2+
use crate::{
3+
dynamic_message::{
4+
DynamicMessage, DynamicSubscriptionState, MessageTypeName, WorkerDynamicSubscription,
5+
WorkerDynamicSubscriptionCallback,
6+
},
7+
MessageInfo,
58
};
69
use crate::{
7-
log_fatal, IntoWorkerServiceCallback, IntoWorkerSubscriptionCallback, MessageInfo, Node,
8-
Promise, RclrsError, ServiceOptions, ServiceState, SubscriptionOptions, SubscriptionState,
10+
log_fatal, IntoWorkerServiceCallback, IntoWorkerSubscriptionCallback, Node, Promise,
11+
RclrsError, ServiceOptions, ServiceState, SubscriptionOptions, SubscriptionState,
912
WorkerCommands, WorkerService, WorkerSubscription,
1013
};
1114
use futures::channel::oneshot;

0 commit comments

Comments
 (0)