Skip to content

Commit

Permalink
Fix unnecessary-qualification in Rust beta
Browse files Browse the repository at this point in the history
```
error: unnecessary qualification
  --> x11rb-protocol/src/wrapper.rs:44:35
   |
44 |         let size = self.0.len() / core::mem::size_of::<T>();
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^
   |
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::<T>();
44 +         let size = self.0.len() / size_of::<T>();
   |
```

Signed-off-by: Uli Schlachter <[email protected]>
  • Loading branch information
psychon committed Jun 23, 2024
1 parent 97675aa commit e1b37ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x11rb-protocol/src/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ where
}

fn size_hint(&self) -> (usize, Option<usize>) {
let size = self.0.len() / core::mem::size_of::<T>();
let size = self.0.len() / size_of::<T>();
(size, Some(size))
}
}
Expand Down

0 comments on commit e1b37ac

Please sign in to comment.