diff --git a/tf_r2r/src/tf_buffer.rs b/tf_r2r/src/tf_buffer.rs index e146fbf2..2609c683 100644 --- a/tf_r2r/src/tf_buffer.rs +++ b/tf_r2r/src/tf_buffer.rs @@ -156,7 +156,7 @@ impl TfBuffer { tf_list.push(x.transform); } } - first = intermediate.clone(); + first.clone_from(&intermediate); } let final_tf = chain_transforms(&tf_list); let msg = TransformStamped { diff --git a/tf_rosrust/src/tf_buffer.rs b/tf_rosrust/src/tf_buffer.rs index 88f6871e..90737c64 100644 --- a/tf_rosrust/src/tf_buffer.rs +++ b/tf_rosrust/src/tf_buffer.rs @@ -155,7 +155,7 @@ impl TfBuffer { tf_list.push(x.transform); } } - first = intermediate.clone(); + first.clone_from(&intermediate); } let final_tf = chain_transforms(&tf_list); let msg = TransformStamped {