Skip to content

Commit aa779c7

Browse files
authored
Add <Arc> to publisher field to fix the compile error (#360)
1 parent 164631e commit aa779c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/writing-your-first-rclrs-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ The node still doesn't republish the received messages. First, let's add a publi
154154

155155
```rust
156156
// Add this new field to the RepublisherNode struct, after the subscription:
157-
publisher: rclrs::Publisher<StringMsg>,
157+
publisher: Arc<rclrs::Publisher<StringMsg>>,
158158

159159
// Change the end of RepublisherNode::new() to this:
160160
let publisher = node.create_publisher("out_topic", rclrs::QOS_PROFILE_DEFAULT)?;

0 commit comments

Comments
 (0)