We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When running Clippy, there are lots of warnings like
warning: unnecessary qualification --> crates\win-api-wrappers\src\thread.rs:175:54 | 175 | ThreadAttributeType::ParentProcess(_) => mem::size_of::<HANDLE>(), | ^^^^^^^^^^^^^^^^^^^^^^ | help: remove the unnecessary path segments | 175 - ThreadAttributeType::ParentProcess(_) => mem::size_of::<HANDLE>(), 175 + ThreadAttributeType::ParentProcess(_) => size_of::<HANDLE>(),
std::mem::size_of and mem::size_of both fail this lint.
std::mem::size_of
mem::size_of
I suggest removing the lint if the maintainers prefer to use mem::size_of, or to accept the lint suggestion, i.e., unqualified size_of.
size_of
I can make a PR for this pending guidance.
#1068 related
The text was updated successfully, but these errors were encountered:
I just discovered that size_of was part of the std prelude: https://doc.rust-lang.org/std/prelude/index.html#prelude-contents For this reason, you can forget what I said here about the guidelines, and just use size_of unqualified. If it’s in the prelude, let’s just use it as-is 👍
Sorry, something went wrong.
allan2
No branches or pull requests
When running Clippy, there are lots of warnings like
std::mem::size_of
andmem::size_of
both fail this lint.I suggest removing the lint if the maintainers prefer to use
mem::size_of
, or to accept the lint suggestion, i.e., unqualifiedsize_of
.I can make a PR for this pending guidance.
#1068 related
The text was updated successfully, but these errors were encountered: