Skip to content

unused_qualification lint warnings #1071

@allan2

Description

@allan2

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.

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.

I can make a PR for this pending guidance.

#1068 related

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions