Skip to content

Add extra JointArray functionality Any, All, Diff #205

Add extra JointArray functionality Any, All, Diff

Add extra JointArray functionality Any, All, Diff #205

GitHub Actions / clippy failed Apr 17, 2024 in 0s

clippy

2 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 2
Warning 0
Note 0
Help 0

Versions

  • rustc 1.77.2 (25ef9e3d8 2024-04-09)
  • cargo 1.77.2 (e52e36006 2024-03-26)
  • clippy 0.1.77 (25ef9e3 2024-04-09)

Annotations

Check failure on line 273 in nidhogg/src/types/joint_array.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

returning the result of a `let` binding from a block

error: returning the result of a `let` binding from a block
   --> nidhogg/src/types/joint_array.rs:273:9
    |
268 | /         let diff_array = self
269 | |             .clone()
270 | |             .zip(other.clone())
271 | |             .map(|(curr, target)| (curr - target).abs());
    | |_________________________________________________________- unnecessary `let` binding
272 |
273 |           diff_array
    |           ^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
    = note: `-D clippy::let-and-return` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::let_and_return)]`
help: return the expression directly
    |
268 ~         
269 | 
270 ~         self
271 +             .clone()
272 +             .zip(other.clone())
273 +             .map(|(curr, target)| (curr - target).abs())
    |

Check failure on line 273 in nidhogg/src/types/joint_array.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

returning the result of a `let` binding from a block

error: returning the result of a `let` binding from a block
   --> nidhogg/src/types/joint_array.rs:273:9
    |
268 | /         let diff_array = self
269 | |             .clone()
270 | |             .zip(other.clone())
271 | |             .map(|(curr, target)| (curr - target).abs());
    | |_________________________________________________________- unnecessary `let` binding
272 |
273 |           diff_array
    |           ^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
    = note: `-D clippy::let-and-return` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::let_and_return)]`
help: return the expression directly
    |
268 ~         
269 | 
270 ~         self
271 +             .clone()
272 +             .zip(other.clone())
273 +             .map(|(curr, target)| (curr - target).abs())
    |