-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some clippy lints #443
Merged
Merged
Commits on Jan 27, 2024
-
Add
#[allow(clippy::eq_op)]
forunit!
macro.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.
Configuration menu - View commit details
-
Copy full SHA for 8cdabec - Browse repository at this point
Copy the full SHA 8cdabecView commit details -
Implement clone properly for copy types.
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 }` ```
Configuration menu - View commit details
-
Copy full SHA for 37ce1e8 - Browse repository at this point
Copy the full SHA 37ce1e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for fef20c2 - Browse repository at this point
Copy the full SHA fef20c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for dd89552 - Browse repository at this point
Copy the full SHA dd89552View commit details -
Configuration menu - View commit details
-
Copy full SHA for e06a5e8 - Browse repository at this point
Copy the full SHA e06a5e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 499b3c3 - Browse repository at this point
Copy the full SHA 499b3c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0933755 - Browse repository at this point
Copy the full SHA 0933755View commit details -
Make unit a unused phantom data in
fmt::Arguments
.The value of that type is never use, only the actual type parameter `N`
Configuration menu - View commit details
-
Copy full SHA for 35e0cfa - Browse repository at this point
Copy the full SHA 35e0cfaView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.