windows: fix build

Weirdly, the rust compiler is suddenly complaining about this,
when this file hasn't changed.

```
error[E0283]: type annotations needed
    --> window\src\os\windows\window.rs:2398:26
     |
2398 |         if vk <= u8::MAX.into() {
     |               --         ^^^^
     |               |
     |               type must be known at this point
     |
     = note: cannot satisfy `u32: PartialOrd<_>`
help: try using a fully qualified path to specify the expected types
     |
2398 |         if vk <= <u8 as Into<T>>::into(u8::MAX) {
     |                  ++++++++++++++++++++++       ~

error[E0283]: type annotations needed
    --> window\src\os\windows\window.rs:2415:32
     |
2415 |         if leader.1 <= u8::MAX.into() && key.1 <= u8::MAX.into() {
     |                     --         ^^^^
     |                     |
     |                     type must be known at this point
     |
     = note: cannot satisfy `u32: PartialOrd<_>`
help: try using a fully qualified path to specify the expected types
     |
2415 |         if leader.1 <= <u8 as Into<T>>::into(u8::MAX) && key.1 <= u8::MAX.into() {
     |                        ++++++++++++++++++++++       ~

```
This commit is contained in:
Wez Furlong committed 2023-08-21 06:00:51 -07:00
1 parent 89fbb87f0d
commit 0456719980
1 file changed
+2 -2
+2 -2
View File
@@ -2395,7 +2395,7 @@ impl KeyboardLayoutInfo {
unsafe {
self.update();
}
if vk <= u8::MAX.into() {
if vk <= (u8::MAX as u32) {
self.dead_keys
.get(&(Self::fixup_mods(mods), vk as u8))
.map(|dead| dead.dead_char)
@@ -2412,7 +2412,7 @@ impl KeyboardLayoutInfo {
unsafe {
self.update();
}
if leader.1 <= u8::MAX.into() && key.1 <= u8::MAX.into() {
if leader.1 <= (u8::MAX as u32) && key.1 <= (u8::MAX as u32) {
if let Some(dead) = self
.dead_keys
.get(&(Self::fixup_mods(leader.0), leader.1 as u8))