Skip to content

Commit 51776d4

Browse files
committed
fix ci
1 parent 624134a commit 51776d4

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

ros-z/examples/z_pubsub_ros2dds.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//! cargo run --example z_pubsub_ros2dds --features ros2dds -- --role listener --topic chatter
3030
//! ```
3131
32-
use std::time::Duration;
32+
use std::{num::NonZeroUsize, time::Duration};
3333

3434
use clap::Parser;
3535
use ros_z::{
@@ -100,6 +100,7 @@ async fn main() -> ros_z::Result<()> {
100100
1, // node_id
101101
"ros2dds_demo".to_string(),
102102
"/".to_string(),
103+
"/".to_string(), // enclave
103104
);
104105

105106
// Topic name - ros2dds uses simple format without leading slash in KE
@@ -116,7 +117,7 @@ async fn main() -> ros_z::Result<()> {
116117
let qos = QosProfile {
117118
reliability: QosReliability::Reliable,
118119
durability: QosDurability::Volatile,
119-
history: QosHistory::KeepLast(10),
120+
history: QosHistory::KeepLast(NonZeroUsize::new(10).unwrap()),
120121
..Default::default()
121122
};
122123

ros-z/examples/z_srvcli_ros2dds.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ async fn run_server(ctx: ros_z::context::ZContext, args: &Args) -> ros_z::Result
141141
request_count += 1;
142142

143143
// Check if we've reached the max requests
144-
if let Some(max) = max_requests {
145-
if request_count >= max {
146-
println!("Handled {} requests, exiting.", request_count);
147-
break;
148-
}
144+
if let Some(max) = max_requests
145+
&& request_count >= max
146+
{
147+
println!("Handled {} requests, exiting.", request_count);
148+
break;
149149
}
150150
}
151151

0 commit comments

Comments
 (0)