You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
This should build correctly. Even with cargo install and cargo build
Actual behavior:
Build fails:
Compiling evdev v0.11.5
Compiling Simple-Wayland-HotKey-Daemon v1.1.4 (/home/uncomfy/Projects/swhkd)
error[E0631]: type mismatch infunctionarguments
--> src/daemon.rs:111:67
|
111 |let keyboard_devices: Vec<Device> = evdev::enumerate().filter(check_keyboard).collect();
| ------ ^^^^^^^^^^^^^^ expected signature of `for<'r> fn(&'r (PathBuf, Device)) -> _`||| required by a bound introduced by this call
...
312 | pub fn check_keyboard(device: &Device) -> bool {
| ---------------------------------------------- found signature of `for<'r> fn(&'r Device) -> _`|
note: required by a bound in`std::iter::Iterator::filter`
error[E0599]: the method `collect` exists for struct `std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>`, but its trait bounds were not satisfied
--> src/daemon.rs:111:83
|
111 |let keyboard_devices: Vec<Device> = evdev::enumerate().filter(check_keyboard).collect();
| ^^^^^^^ method cannot be called on `std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>: tokio_stream::Stream`
which is required by `std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>: StreamExt``<for<'r> fn(&'r Device) -> bool {check_keyboard} as FnOnce<(&(PathBuf, Device),)>>::Output = bool`
which is required by `std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>: Iterator``for<'r> fn(&'r Device) -> bool {check_keyboard}: FnMut<(&(PathBuf, Device),)>`
which is required by `std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>: Iterator``&std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>: tokio_stream::Stream`
which is required by `&std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>: StreamExt``&mut std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>: tokio_stream::Stream`
which is required by `&mut std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>: StreamExt``std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>: Iterator`
which is required by `&mut std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>: Iterator`
error[E0631]: type mismatch infunctionarguments
--> src/daemon.rs:185:74
|
185 |let keyboard_devices = evdev::enumerate().filter(check_keyboard);
| ------ ^^^^^^^^^^^^^^ expected signature of `for<'r> fn(&'r (PathBuf, Device)) -> _`||| required by a bound introduced by this call
...
312 | pub fn check_keyboard(device: &Device) -> bool {
| ---------------------------------------------- found signature of `for<'r> fn(&'r Device) -> _`|
note: required by a bound in`std::iter::Iterator::filter`
error[E0631]: type mismatch infunctionarguments
--> src/daemon.rs:186:43
|
186 |formut devicein keyboard_devices {
| ^^^^^^^^^^^^^^^^ expected signature of `for<'r> fn(&'r (PathBuf, Device)) -> _`
...
312 | pub fn check_keyboard(device: &Device) -> bool {
| ---------------------------------------------- found signature of `for<'r> fn(&'r Device) -> _`|
= note: required because of the requirements on the impl of `Iterator`for`std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>`
= note: required because of the requirements on the impl of `IntoIterator`for`std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>`
error[E0599]: no method named `ungrab` found fortuple `(PathBuf, Device)`in the current scope
--> src/daemon.rs:187:45
|
187 | ... let _ = &device.ungrab();
| ^^^^^^ method not found in`(PathBuf, Device)`
error[E0631]: type mismatch infunctionarguments
--> src/daemon.rs:192:74
|
192 |let keyboard_devices = evdev::enumerate().filter(check_keyboard);
| ------ ^^^^^^^^^^^^^^ expected signature of `for<'r> fn(&'r (PathBuf, Device)) -> _`||| required by a bound introduced by this call
...
312 | pub fn check_keyboard(device: &Device) -> bool {
| ---------------------------------------------- found signature of `for<'r> fn(&'r Device) -> _`|
note: required by a bound in`std::iter::Iterator::filter`
error[E0631]: type mismatch infunctionarguments
--> src/daemon.rs:193:43
|
193 |formut devicein keyboard_devices {
| ^^^^^^^^^^^^^^^^ expected signature of `for<'r> fn(&'r (PathBuf, Device)) -> _`
...
312 | pub fn check_keyboard(device: &Device) -> bool {
| ---------------------------------------------- found signature of `for<'r> fn(&'r Device) -> _`|
= note: required because of the requirements on the impl of `Iterator`for`std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>`
= note: required because of the requirements on the impl of `IntoIterator`for`std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>`
error[E0599]: no method named `grab` found fortuple `(PathBuf, Device)`in the current scope
--> src/daemon.rs:194:45
|
194 | ... let _ = &device.grab();
| ^^^^ method not found in`(PathBuf, Device)`
error[E0631]: type mismatch infunctionarguments
--> src/daemon.rs:205:74
|
205 |let keyboard_devices = evdev::enumerate().filter(check_keyboard);
| ------ ^^^^^^^^^^^^^^ expected signature of `for<'r> fn(&'r (PathBuf, Device)) -> _`||| required by a bound introduced by this call
...
312 | pub fn check_keyboard(device: &Device) -> bool {
| ---------------------------------------------- found signature of `for<'r> fn(&'r Device) -> _`|
note: required by a bound in`std::iter::Iterator::filter`
error[E0631]: type mismatch infunctionarguments
--> src/daemon.rs:206:43
|
206 |formut devicein keyboard_devices {
| ^^^^^^^^^^^^^^^^ expected signature of `for<'r> fn(&'r (PathBuf, Device)) -> _`
...
312 | pub fn check_keyboard(device: &Device) -> bool {
| ---------------------------------------------- found signature of `for<'r> fn(&'r Device) -> _`|
= note: required because of the requirements on the impl of `Iterator`for`std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>`
= note: required because of the requirements on the impl of `IntoIterator`for`std::iter::Filter<evdev::EnumerateDevices, for<'r> fn(&'r Device) -> bool {check_keyboard}>`
error[E0599]: no method named `ungrab` found fortuple `(PathBuf, Device)`in the current scope
--> src/daemon.rs:207:45
|
207 | ... let _ = &device.ungrab();
| ^^^^^^ method not found in`(PathBuf, Device)`
Some errors have detailed explanations: E0599, E0631.
For more information about an error, try `rustc --explain E0599`.
error: could not compile `Simple-Wayland-HotKey-Daemon` due to 11 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
To Reproduce:
Remove Cargo.lock, then run cargo build --release
Additional information:
UWU
The text was updated successfully, but these errors were encountered:
Version Information:
ed4b266b1000099150ba00e0b552f54a1c86f658
Describe the bug:
As what rust has suggested in https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html, removing
Cargo.lock
is required if creating an executable. However, because we didn't remove it, we have found ourselves in deep water. uwuExpected behavior:
This should build correctly. Even with
cargo install
andcargo build
Actual behavior:
Build fails:
To Reproduce:
Remove
Cargo.lock
, then runcargo build --release
Additional information:
UWU
The text was updated successfully, but these errors were encountered: