Skip to content

Commit 8c216af

Browse files
Minor cleanup
Signed-off-by: Luca Della Vedova <[email protected]>
1 parent 5b513ba commit 8c216af

File tree

4 files changed

+6
-27
lines changed

4 files changed

+6
-27
lines changed

rclrs/src/dynamic_message/dynamic_publisher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl DynamicPublisher {
5151
/// Creates a new `DynamicPublisher`.
5252
///
5353
/// Node and namespace changes are always applied _before_ topic remapping.
54-
pub fn new(
54+
pub(crate) fn new(
5555
node_handle: &Arc<NodeHandle>,
5656
topic: &str,
5757
topic_type: MessageTypeName,

rclrs/src/dynamic_message/dynamic_subscription.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use std::any::Any;
22
use std::boxed::Box;
33
use std::ffi::{CStr, CString};
44
use std::ops::{Deref, DerefMut};
5-
use std::sync::atomic::AtomicBool;
65
use std::sync::{Arc, Mutex};
76

87
use futures::future::BoxFuture;
@@ -13,9 +12,9 @@ use super::{
1312
};
1413
use crate::rcl_bindings::*;
1514
use crate::{
16-
MessageInfo, Node, NodeHandle, QoSProfile, RclPrimitive, RclPrimitiveHandle, RclPrimitiveKind,
17-
RclReturnCode, RclrsError, SubscriptionHandle, ToResult, Waitable, WaitableLifecycle,
18-
WorkScope, WorkerCommands, ENTITY_LIFECYCLE_MUTEX,
15+
MessageInfo, NodeHandle, QoSProfile, RclPrimitive, RclPrimitiveHandle, RclPrimitiveKind,
16+
RclrsError, SubscriptionHandle, ToResult, Waitable, WaitableLifecycle, WorkScope,
17+
WorkerCommands, ENTITY_LIFECYCLE_MUTEX,
1918
};
2019

2120
struct DynamicSubscriptionExecutable<Payload> {
@@ -85,7 +84,7 @@ impl<Payload> From<WorkerDynamicSubscriptionCallback<Payload>>
8584
}
8685

8786
impl<Payload: 'static> DynamicSubscriptionCallback<Payload> {
88-
pub(super) fn execute(
87+
fn execute(
8988
&mut self,
9089
executable: &DynamicSubscriptionExecutable<Payload>,
9190
any_payload: &mut dyn Any,
@@ -266,15 +265,6 @@ where
266265
metadata,
267266
type_support_library,
268267
}))
269-
270-
/*
271-
Ok(Self {
272-
handle,
273-
callback: Mutex::new(Box::new(callback)),
274-
metadata,
275-
type_support_library,
276-
})
277-
*/
278268
}
279269

280270
/// Returns the topic name of the subscription.

rclrs/src/node.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ mod primitive_options;
55
pub use primitive_options::*;
66

77
mod graph;
8-
/*
9-
<<<<<<< HEAD
10-
11-
pub use self::builder::*;
12-
pub use self::graph::*;
13-
=======
14-
*/
158
#[cfg(feature = "dyn_msg")]
169
use crate::dynamic_message::{DynamicMessage, DynamicSubscription};
1710
use crate::QoSProfile;
@@ -27,9 +20,8 @@ use std::{
2720
ffi::CStr,
2821
fmt,
2922
os::raw::c_char,
30-
sync::{atomic::AtomicBool, Arc, Mutex, Weak},
23+
sync::{atomic::AtomicBool, Arc, Mutex},
3124
time::Duration,
32-
vec::Vec,
3325
};
3426

3527
use futures::{

rclrs/src/subscription.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ use crate::{
1212
WorkScope, Worker, WorkerCommands, ENTITY_LIFECYCLE_MUTEX,
1313
};
1414

15-
#[cfg(feature = "dyn_msg")]
16-
use crate::dynamic_message::DynamicMessage;
17-
1815
mod any_subscription_callback;
1916
pub use any_subscription_callback::*;
2017

0 commit comments

Comments
 (0)