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:
parent
da7422c6e1
commit
402cbd55f9
27 changed files with 63 additions and 64 deletions
|
|
@ -140,7 +140,7 @@ impl Window {
|
|||
#[inline]
|
||||
pub fn outer_position(&self) -> Result<PhysicalPosition<i32>, NotSupportedError> {
|
||||
util::WindowArea::Outer.get_rect(self.hwnd())
|
||||
.map(|rect| Ok(PhysicalPosition::new(rect.left as i32, rect.top as i32)))
|
||||
.map(|rect| Ok(PhysicalPosition::new(rect.left, rect.top)))
|
||||
.expect("Unexpected GetWindowRect failure; please report this error to https://github.com/rust-windowing/winit")
|
||||
}
|
||||
|
||||
|
|
@ -150,7 +150,7 @@ impl Window {
|
|||
if unsafe { ClientToScreen(self.hwnd(), &mut position) } == false.into() {
|
||||
panic!("Unexpected ClientToScreen failure: please report this error to https://github.com/rust-windowing/winit")
|
||||
}
|
||||
Ok(PhysicalPosition::new(position.x as i32, position.y as i32))
|
||||
Ok(PhysicalPosition::new(position.x, position.y))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue