Skip to content

Commit

Permalink
🚨 zb: Fix some clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zeenix committed Feb 23, 2024
1 parent 3b3aedb commit cea8d12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion zbus/src/fdo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ mod tests {
)
.unwrap();
let e: Error = m.into();
let e: fdo::Error = e.try_into().unwrap();
let e: fdo::Error = e.into();
assert_eq!(e, fdo::Error::TimedOut("so long".to_string()),);
assert_eq!(e.name(), "org.freedesktop.DBus.Error.TimedOut");
assert_eq!(e.description(), Some("so long"));
Expand Down
4 changes: 1 addition & 3 deletions zbus/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,7 @@ impl PropertiesCache {
}
trace!("Property `{interface}.{property_name}` updated");

let entry = values
.entry(property_name.to_string())
.or_insert_with(PropertyValue::default);
let entry = values.entry(property_name.to_string()).or_default();

entry.value = Some(OwnedValue::from(value));
entry.event.notify(usize::MAX);
Expand Down

0 comments on commit cea8d12

Please sign in to comment.