all: address clippy lints
This commit is contained in:
parent
1e24e6ca1a
commit
84f7f88399
3 changed files with 13 additions and 9 deletions
|
|
@ -1473,10 +1473,10 @@ fn create_connector_display_data(
|
|||
for descriptor in edid.base_block.descriptors.iter().flatten() {
|
||||
match descriptor {
|
||||
Descriptor::DisplayProductSerialNumber(s) => {
|
||||
serial_number = s.clone();
|
||||
serial_number.clone_from(s);
|
||||
}
|
||||
Descriptor::DisplayProductName(s) => {
|
||||
name = s.clone();
|
||||
name.clone_from(s);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,11 @@ impl<T: ToplevelNodeBase> ToplevelNode for T {
|
|||
parent.node_child_title_changed(self, &title);
|
||||
}
|
||||
if let Some(data) = data.fullscrceen_data.borrow_mut().deref() {
|
||||
*data.placeholder.tl_data().title.borrow_mut() = title.clone();
|
||||
data.placeholder
|
||||
.tl_data()
|
||||
.title
|
||||
.borrow_mut()
|
||||
.clone_from(&title);
|
||||
data.placeholder.tl_title_changed();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,26 +41,26 @@ impl<K: Eq + Hash, V> CopyHashMap<K, V> {
|
|||
unsafe { self.map.get().deref_mut().insert(k, v) }
|
||||
}
|
||||
|
||||
pub fn get<Q: ?Sized>(&self, k: &Q) -> Option<V>
|
||||
pub fn get<Q>(&self, k: &Q) -> Option<V>
|
||||
where
|
||||
V: UnsafeCellCloneSafe,
|
||||
Q: Hash + Eq,
|
||||
Q: Hash + Eq + ?Sized,
|
||||
K: Borrow<Q>,
|
||||
{
|
||||
unsafe { self.map.get().deref().get(k).cloned() }
|
||||
}
|
||||
|
||||
pub fn remove<Q: ?Sized>(&self, k: &Q) -> Option<V>
|
||||
pub fn remove<Q>(&self, k: &Q) -> Option<V>
|
||||
where
|
||||
Q: Hash + Eq,
|
||||
Q: Hash + Eq + ?Sized,
|
||||
K: Borrow<Q>,
|
||||
{
|
||||
unsafe { self.map.get().deref_mut().remove(k) }
|
||||
}
|
||||
|
||||
pub fn contains<Q: ?Sized>(&self, k: &Q) -> bool
|
||||
pub fn contains<Q>(&self, k: &Q) -> bool
|
||||
where
|
||||
Q: Hash + Eq,
|
||||
Q: Hash + Eq + ?Sized,
|
||||
K: Borrow<Q>,
|
||||
{
|
||||
unsafe { self.map.get().deref().contains_key(k) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue