tauri-apps/global-hotkey

build failed on all x32 target(including `i686`, `armv7`)

Closed this issue · 1 comments

build compiled failted with:

error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:126:21
    |
122 |                 (xlib.XGrabKey)(
    |                 --------------- arguments to this function are incorrect
...
126 |                     root,
    |                     ^^^^ expected `u32`, found `u64`
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
126 |                     root.try_into().unwrap(),
    |                         ++++++++++++++++++++

error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:135:86
    |
135 |                     unsafe { (xlib.XUngrabKey)(display, keycode as _, modifiers | m, root) };
    |                              -----------------                                       ^^^^ expected `u32`, found `u64`
    |                              |
    |                              arguments to this function are incorrect
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
135 |                     unsafe { (xlib.XUngrabKey)(display, keycode as _, modifiers | m, root.try_into().unwrap()) };
    |                                                                                          ++++++++++++++++++++

error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:175:78
    |
175 |             unsafe { (xlib.XUngrabKey)(display, keycode as _, modifiers | m, root) };
    |                      -----------------                                       ^^^^ expected `u32`, found `u64`
    |                      |
    |                      arguments to this function are incorrect
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
175 |             unsafe { (xlib.XUngrabKey)(display, keycode as _, modifiers | m, root.try_into().unwrap()) };
    |                                                                                  ++++++++++++++++++++

error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:253:33
    |
250 | ...                   let _ = tx.send(register_hotkey(
    |                                       --------------- arguments to this function are incorrect
...
253 | ...                       root,
    |                           ^^^^ expected `u64`, found `u32`
    |
note: function defined here
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:105:4
    |
105 | fn register_hotkey(
    |    ^^^^^^^^^^^^^^^
...
108 |     root: u64,
    |     ---------
help: you can convert a `u32` to a `u64`
    |
253 |                                 root.into(),
    |                                     +++++++

error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:261:69
    |
261 | ...                   register_hotkey(&xlib, display, root, &mut hotkeys, hotkey)
    |                       ---------------                 ^^^^ expected `u64`, found `u32`
    |                       |
    |                       arguments to this function are incorrect
    |
note: function defined here
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:105:4
    |
105 | fn register_hotkey(
    |    ^^^^^^^^^^^^^^^
...
108 |     root: u64,
    |     ---------
help: you can convert a `u32` to a `u64`
    |
261 |                                     register_hotkey(&xlib, display, root.into(), &mut hotkeys, hotkey)
    |                                                                         +++++++

   Compiling os_info v3.8.2
error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:272:33
    |
269 | ...                   let _ = tx.send(unregister_hotkey(
    |                                       ----------------- arguments to this function are incorrect
...
272 | ...                       root,
    |                           ^^^^ expected `u64`, found `u32`
    |
note: function defined here
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:159:4
    |
159 | fn unregister_hotkey(
    |    ^^^^^^^^^^^^^^^^^
...
162 |     root: u64,
    |     ---------
help: you can convert a `u32` to a `u64`
    |
272 |                                 root.into(),
    |                                     +++++++

error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:280:71
    |
280 | ...                   unregister_hotkey(&xlib, display, root, &mut hotkeys, hotkey)
    |                       -----------------                 ^^^^ expected `u64`, found `u32`
    |                       |
    |                       arguments to this function are incorrect
    |
note: function defined here
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:159:4
    |
159 | fn unregister_hotkey(
    |    ^^^^^^^^^^^^^^^^^
...
162 |     root: u64,
    |     ---------
help: you can convert a `u32` to a `u64`
    |
280 |                                     unregister_hotkey(&xlib, display, root.into(), &mut hotkeys, hotkey)
error: could not compile `global-hotkey` (lib) due to 7 previous errors

I have tested on i686-unknown-linux-gnu. The same issue occurred.