@@ -92,7 +92,6 @@ To construct a node, replace the code in your `main.rs` file with the following:
9292``` rust
9393/// Creates a SimplePublisherNode, initializes a node and publisher, and provides
9494/// methods to publish a simple "Hello World" message on a loop in separate threads.
95-
9695use rclrs :: {create_node, Context , Node , Publisher , RclrsError , QOS_PROFILE_DEFAULT };
9796use std :: {env, sync :: Arc , thread, time :: Duration };
9897use std_msgs :: msg :: String as StringMsg ;
@@ -103,12 +102,12 @@ struct SimplePublisherNode {
103102 publisher : Arc <Publisher <StringMsg >>,
104103}
105104impl SimplePublisherNode {
106- fn new (context : & context ) -> result < self , RclrsError > {
105+ fn new (context : & Context ) -> Result < Self , RclrsError > {
107106 let node = create_node (context , " simple_publisher" ). unwrap ();
108107 let publisher = node
109- . create_publisher (" publish_hello" , qos_profile_default )
108+ . create_publisher (" publish_hello" , QOS_PROFILE_DEFAULT )
110109 . unwrap ();
111- ok ( self { node , publisher })
110+ Ok ( Self { node , publisher })
112111 }
113112 fn publish_data (& self , increment : i32 ) -> Result <i32 , RclrsError > {
114113 let msg : StringMsg = StringMsg {
0 commit comments