HactarCE / key-names

Platform-aware keyboard key name handling for Rust applications
Apache License 2.0
5 stars 5 forks source link

Error while compiling 1.0.1 #1

Closed cozyGalvinism closed 2 years ago

cozyGalvinism commented 2 years ago

Yeah so for some reason key-names doesn't compile for me:

   Compiling key-names v1.0.1 (https://github.com/HactarCE/key-names#e001bde6)
error[E0308]: mismatched types
   --> /home/cozygalvinism/.cargo/git/checkouts/key-names-cd5ddcb8fe8a0903/e001bde/src/linux.rs:372:9
    |
372 |         &conn,
    |         ^^^^^ expected struct `xcb::base::Connection`, found struct `xcb::Connection`
    |
    = note: expected reference `&xcb::base::Connection`
               found reference `&xcb::Connection`
    = note: perhaps two different versions of crate `xcb` are being used?

error[E0308]: mismatched types
   --> /home/cozygalvinism/.cargo/git/checkouts/key-names-cd5ddcb8fe8a0903/e001bde/src/linux.rs:382:59
    |
382 |     let device_id = xkb::x11::get_core_keyboard_device_id(&conn);
    |                                                           ^^^^^ expected struct `xcb::base::Connection`, found struct `xcb::Connection`
    |
    = note: expected reference `&xcb::base::Connection`
               found reference `&xcb::Connection`
    = note: perhaps two different versions of crate `xcb` are being used?

error[E0308]: mismatched types
   --> /home/cozygalvinism/.cargo/git/checkouts/key-names-cd5ddcb8fe8a0903/e001bde/src/linux.rs:386:47
    |
386 |     Ok(xkb::x11::keymap_new_from_device(&ctx, &conn, device_id, 0))
    |                                               ^^^^^ expected struct `xcb::base::Connection`, found struct `xcb::Connection`
    |
    = note: expected reference `&xcb::base::Connection`
               found reference `&xcb::Connection`
    = note: perhaps two different versions of crate `xcb` are being used?

For more information about this error, try `rustc --explain E0308`.
error: could not compile `key-names` due to 3 previous errors

This is on Arch Linux.

cozyGalvinism commented 2 years ago

Already found a possible fix: Change the xcb version to 0.9.0 instead of 0.8.0