Skip to content

Commit

Permalink
fix format and clippy warns
Browse files Browse the repository at this point in the history
  • Loading branch information
JEnoch committed Nov 27, 2024
1 parent 340f38f commit 7ce4c91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions zenoh-plugin-ros2dds/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,9 @@ fn default_automatic_discovery_range() -> Option<RosAutomaticDiscoveryRange> {
Ok("OFF") => Some(RosAutomaticDiscoveryRange::Localhost),
Ok("SYSTEM_DEFAULT") => Some(RosAutomaticDiscoveryRange::SystemDefault),
Ok(value) => {
warn!(r#"Invalid value for environment variable ROS_AUTOMATIC_DISCOVERY_RANGE ("{value}"). Using "SUBNET" instead "#);
warn!(
r#"Invalid value for environment variable ROS_AUTOMATIC_DISCOVERY_RANGE ("{value}"). Using "SUBNET" instead "#
);
Some(RosAutomaticDiscoveryRange::Subnet)
}
Err(_) => None,
Expand Down Expand Up @@ -525,7 +527,7 @@ where
let peers: String = Deserialize::deserialize(deserializer).unwrap();
let mut peer_list: Vec<String> = Vec::new();
for peer in peers.split(';') {
if peer != "" {
if !peer.is_empty() {
peer_list.push(peer.to_owned());
}
}
Expand Down
2 changes: 1 addition & 1 deletion zenoh-plugin-ros2dds/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ pub async fn run(runtime: Runtime, config: Config) {
(Some(RosAutomaticDiscoveryRange::Localhost), None)
} else {
(
config.ros_automatic_discovery_range.clone(),
config.ros_automatic_discovery_range,
config.ros_static_peers.clone(),
)
};
Expand Down

0 comments on commit 7ce4c91

Please sign in to comment.