mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-08 15:40:34 -04:00
Fix a couple of clippy warnings.
Use .iter instead of .into_iter in uinput.rs Use type definitions to fix some complexity in power.rs. See https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
This commit is contained in:
parent
35c90bf55a
commit
943cf70dbb
2 changed files with 5 additions and 2 deletions
|
@ -177,9 +177,12 @@ pub(crate) enum SysfsWritten {
|
|||
Superseded,
|
||||
}
|
||||
|
||||
type SysfsQueue = (Vec<u8>, oneshot::Sender<SysfsWritten>);
|
||||
type SysfsQueueMap = HashMap<PathBuf, SysfsQueue>;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct SysfsWriterQueue {
|
||||
values: Mutex<HashMap<PathBuf, (Vec<u8>, oneshot::Sender<SysfsWritten>)>>,
|
||||
values: Mutex<SysfsQueueMap>,
|
||||
notify: Notify,
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ impl UInputDevice {
|
|||
ensure!(!self.open, "Cannot reopen uinput handle");
|
||||
|
||||
self.handle.set_evbit(EventKind::Key)?;
|
||||
for key in keybits.into_iter().copied() {
|
||||
for key in keybits.iter().copied() {
|
||||
self.handle.set_keybit(key)?;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue