Skip to content

Commit

Permalink
Fix clippy::assigning_clones warning
Browse files Browse the repository at this point in the history
```
error: assigning the result of `Clone::clone()` may be inefficient
   --> tf_rosrust/src/tf_buffer.rs:158:21
    |
158 |                     first = intermediate.clone();
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `first.clone_from(&intermediate)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
    = note: `-D clippy::assigning-clones` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::assigning_clones)]`
```
  • Loading branch information
taiki-e committed May 20, 2024
1 parent 5816475 commit 1579ad5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tf_rosrust/src/tf_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1579ad5

Please sign in to comment.