From f921b020847eee1dc640b19fa9001ee19ed1701e Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 23 Jun 2024 11:30:08 +0200 Subject: [PATCH] Fix unnecessary-qualification in Rust beta ``` error: unnecessary qualification --> x11rb-protocol/src/wrapper.rs:44:35 | 44 | let size = self.0.len() / core::mem::size_of::(); | ^^^^^^^^^^^^^^^^^^^^^^^ | note: the lint level is defined here --> x11rb-protocol/src/lib.rs:49:5 | 49 | unused_qualifications, | ^^^^^^^^^^^^^^^^^^^^^ help: remove the unnecessary path segments | 44 - let size = self.0.len() / core::mem::size_of::(); 44 + let size = self.0.len() / size_of::(); | ``` Signed-off-by: Uli Schlachter --- x11rb-protocol/src/wrapper.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x11rb-protocol/src/wrapper.rs b/x11rb-protocol/src/wrapper.rs index 6e6f27bd..5bbe25b2 100644 --- a/x11rb-protocol/src/wrapper.rs +++ b/x11rb-protocol/src/wrapper.rs @@ -41,7 +41,8 @@ where } fn size_hint(&self) -> (usize, Option) { - let size = self.0.len() / core::mem::size_of::(); + use core::mem::size_of; + let size = self.0.len() / size_of::(); (size, Some(size)) } }