Allow usage and borrow cleanups#1571
Conversation
tests/oper.rs
Outdated
| let a = a.map(|f| *f as f32); | ||
| let b = b.map(|f| *f as f32); | ||
| let a = a.map(|f| *f); | ||
| let b = b.map(|f| *f); |
There was a problem hiding this comment.
If this function is testing the dot product, those 2 lines are useless and should be removed. They are overwriting the arrays with the same arrays.
There was a problem hiding this comment.
Thanks. Good catch. Fixed.
|
Thanks for the cleanup. What were you using to catch all of these? Did you do it by hand? If there's a way to automate it, we should add it to the CI |
Hey, I actually run: I didn't push it in the github workflow because it may be overly strict but I can add it if its desired |
I noticed several duplicated
clippy::many_single_char_namesallows across files, removed a few unnecessary uses of thevec!macro for literal values, and cleaned up some redundantclone()calls where the type implementsCopy. I also elided one unnecessary lifetime annotation and removed a few cases of unnecessary borrowing. Also rancargo fmt --allfor good measure.