fix unnecessary cast lint (#2596)

* fix clippy lints on Windows

* fix lints on other platforms

* a couple more

* again

* don't know what's goging on anymore

* fix examples

* comon

* how about now?

* this is getting annoying

* hmmm

* explicitly set a type

* 😢

* don't cast on x64 targets

* apply code review requests

* fix attributes on expressions

* fix ios
This commit is contained in:
Amr Bashir 2022-12-22 21:35:33 +02:00 committed by GitHub
parent da7422c6e1
commit 402cbd55f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 63 additions and 64 deletions

View file

@ -241,7 +241,7 @@ impl MonitorHandle {
i += 1;
const REQUIRED_FIELDS: u32 =
(DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY) as u32;
DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
assert!(has_flag(mode.dmFields, REQUIRED_FIELDS));
// Use Ord impl of RootVideoMode
@ -249,7 +249,7 @@ impl MonitorHandle {
video_mode: VideoMode {
size: (mode.dmPelsWidth, mode.dmPelsHeight),
bit_depth: mode.dmBitsPerPel as u16,
refresh_rate_millihertz: mode.dmDisplayFrequency as u32 * 1000,
refresh_rate_millihertz: mode.dmDisplayFrequency * 1000,
monitor: self.clone(),
native_video_mode: Box::new(mode),
},