iliekturtles / uom

Units of measurement -- type-safe zero-cost dimensional analysis
Apache License 2.0
989 stars 89 forks source link

Fix some clippy lints #443

Closed hellow554 closed 6 months ago

hellow554 commented 9 months ago

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.

iliekturtles commented 9 months ago

Thanks for the PR! Did you run clippy with extra parameters to get the Self warnings? I kicked off tests and there are some errors, could you review?

hellow554 commented 9 months ago

with extra parameters to get the Self warnings

yes, indeed: cargo clippy -- -Wclippy::pedantic -Wclippy::nursery

I'll look into the CI errors, give me a minute :)

hellow554 commented 9 months ago

Yeah... I was not sure about the unit field in that struct. I thought it was a too big issue to remove it, but I can give it a try

hellow554 commented 9 months ago

I did something, it works on my machine, let's hope it gets through CI

hellow554 commented 8 months ago

package memchr v2.6.4 cannot be built because it requires rustc 1.61 or newer, while the currently active rustc version is 1.60.0

:( Not my fault, but I can try to fix it, if you like

iliekturtles commented 6 months ago

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 86407300a60bdb1a968dfa97568bccec199b3218.

iliekturtles commented 6 months ago

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.

hellow554 commented 6 months ago

@iliekturtles I opened #456 Please have a look :)

iliekturtles commented 6 months ago

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.

hellow554 commented 6 months ago

Sure enough! Thanks for the merge