Skip to content

Commit

Permalink
Clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sirius902 committed Jun 1, 2024
1 parent a508449 commit 53a70b4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/gcfeeder-core/src/adapter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub struct Adapter<T: UsbContext> {

impl<T: UsbContext> Adapter<T> {
pub fn open(context: &T) -> Result<Self> {
let mut handle = Self::find_and_open_device(context)?;
let handle = Self::find_and_open_device(context)?;

match handle.kernel_driver_active(0) {
Ok(b) => {
Expand Down
2 changes: 1 addition & 1 deletion crates/gcfeeder-core/src/bridge/uinput.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{
Arc, Mutex,
},
thread,
time::{self, Duration},
time::{self},
};

use enclose::enclose;
Expand Down
2 changes: 1 addition & 1 deletion crates/gcfeeder/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn main() {
let mut emitter = vergen::EmitBuilder::builder();
emitter.git_sha(true);

if matches!(emitter.emit(), Err(_)) {
if emitter.emit().is_err() {
println!("cargo:rustc-env={VERSION_VAR}=unknown");
println!("cargo:rustc-env=VERGEN_GIT_SHA=");
}
Expand Down
4 changes: 2 additions & 2 deletions crates/gcfeeder/src/gui/app/panel/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl<'a> ConfigEditor<'a> {
.expect("Active profile exists");

*dirty = true;
self.config.profile.selected[p.index()] = name.clone();
self.config.profile.selected[p.index()].clone_from(&name);
self.config.profile.list.insert(name, action_profile);
}
Some(ProfileAction::Remove(name)) => {
Expand All @@ -137,7 +137,7 @@ impl<'a> ConfigEditor<'a> {

for selected in self.config.profile.selected.iter_mut() {
if *selected == name {
*selected = other_name.clone();
selected.clone_from(other_name);
}
}
}
Expand Down

0 comments on commit 53a70b4

Please sign in to comment.