From a124c21e6d8e2cfd15223d6393394dc7293000b9 Mon Sep 17 00:00:00 2001 From: Martin Dahl Date: Wed, 29 Apr 2020 17:24:49 +0200 Subject: [PATCH] Added missing derives from publisher handle --- examples/publish_complex_msgs.rs | 3 +-- src/lib.rs | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/publish_complex_msgs.rs b/examples/publish_complex_msgs.rs index 49cb6d1..2ac0df9 100644 --- a/examples/publish_complex_msgs.rs +++ b/examples/publish_complex_msgs.rs @@ -46,8 +46,7 @@ fn main() -> Result<(), Error> { // run for 10 seconds let mut count = 0; - // while count < 100 { - loop { + while count < 100 { node.spin_once(std::time::Duration::from_millis(100)); count += 1; } diff --git a/src/lib.rs b/src/lib.rs index 9b91945..866226b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -350,6 +350,7 @@ where unsafe impl Send for Publisher where T: WrappedTypesupport {} use std::sync::{Arc, Mutex, Weak}; +#[derive(Debug, Clone)] pub struct Publisher where T: WrappedTypesupport, @@ -359,6 +360,7 @@ where } unsafe impl Send for PublisherUntyped {} +#[derive(Debug, Clone)] pub struct PublisherUntyped { handle: Weak, type_: String,