Fix some clippy lints#443
Conversation
|
Thanks for the PR! Did you run |
yes, indeed: I'll look into the CI errors, give me a minute :) |
|
Yeah... I was not sure about the |
|
I did something, it works on my machine, let's hope it gets through CI |
:( Not my fault, but I can try to fix it, if you like |
|
Sorry for the extended delay! Go ahead and add a commit to bump the MSRV to 1.61.0. You can model the commit after 8640730. |
|
I just realized the 1.61.0 requirement is causing a problem in master right now and isn't from this PR. The MSRV bump should be separate if you get a chance to submit a new PR before I can get it fixed. |
|
@iliekturtles I opened #456 Please have a look :) |
Without this, `clippy` would give a lot of errors, because of the `prefix!(kilo) / prefix!(kilo)` and other similar macro calls which have result in 1 which is okay for our use case. Therefore the `#[allow(...)]` seems reasonable here.
This fixes another `clippy` warning:
```
warning: non-canonical implementation of `clone` on a `Copy` type
--> src/system.rs:1468:41
|
1468 | fn clone(&self) -> Self {
| _________________________________________^
1469 | | Self {
1470 | | dimension: $crate::lib::marker::PhantomData,
1471 | | unit: self.unit.clone(),
1472 | | style: self.style.clone(),
1473 | | }
1474 | | }
| |_________________^ help: change this to: `{ *self }`
```
The value of that type is never use, only the actual type parameter `N`
|
Thanks again for this PR. I just merged! I went through doing a final review. I made some minor edits to the commit messages and a couple fixes to the code. |
|
Sure enough! Thanks for the merge |
I really love clippy and I ran it so see if anything can be improved.
But the very first things was an clippy error that I saw, so I looked at it and decided that that error is acceptable and can be allowed.
This PR is read best per commit.
If you like I can purge certain commits and/or split them into seperate PRs.