mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Small clippy cleanups
This commit is contained in:
@@ -125,10 +125,8 @@ impl AsusArmouryAttribute {
|
||||
|
||||
#[zbus(property)]
|
||||
async fn current_value(&self) -> fdo::Result<i32> {
|
||||
if let Ok(v) = self.0.current_value() {
|
||||
if let AttrValue::Integer(i) = v {
|
||||
return Ok(i);
|
||||
}
|
||||
if let Ok(AttrValue::Integer(i)) = self.0.current_value() {
|
||||
return Ok(i);
|
||||
}
|
||||
Err(fdo::Error::Failed(
|
||||
"Could not read current value".to_string(),
|
||||
|
||||
@@ -213,7 +213,7 @@ impl DeviceManager {
|
||||
) -> Option<AsusDevice> {
|
||||
// "ID_MODEL_ID" "1932"
|
||||
// "ID_VENDOR_ID" "0b05"
|
||||
if dev_prop_matches(&device, "ID_VENDOR_ID", "0b05") {
|
||||
if dev_prop_matches(device, "ID_VENDOR_ID", "0b05") {
|
||||
if let Some(dev_node) = device.devnode() {
|
||||
let prod_id = device
|
||||
.property_value("ID_MODEL_ID")
|
||||
@@ -426,14 +426,11 @@ impl DeviceManager {
|
||||
info!("removing: {path:?}");
|
||||
let dev = devices.lock().await.remove(index);
|
||||
let path = path.clone();
|
||||
match dev.device {
|
||||
DeviceHandle::Scsi(_) => {
|
||||
conn_copy
|
||||
.object_server()
|
||||
.remove::<ScsiZbus, _>(&path)
|
||||
.await?;
|
||||
}
|
||||
_ => {}
|
||||
if let DeviceHandle::Scsi(_) = dev.device {
|
||||
conn_copy
|
||||
.object_server()
|
||||
.remove::<ScsiZbus, _>(&path)
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
} else if action == "add" {
|
||||
|
||||
Reference in New Issue
Block a user