fix clippy

This commit is contained in:
Evan Almloff 2023-10-25 16:47:04 -05:00
parent b99f081c08
commit 370c6cb9d2
2 changed files with 4 additions and 10 deletions

View file

@ -167,11 +167,8 @@ impl VirtualDom {
let mut listeners = scope.attributes_to_drop_before_render.borrow_mut();
listeners.drain(..).for_each(|listener| {
let listener = unsafe { &*listener };
match &listener.value {
AttributeValue::Listener(l) => {
_ = l.take();
}
_ => (),
if let AttributeValue::Listener(l) = &listener.value {
_ = l.take();
}
});
}

View file

@ -45,11 +45,8 @@ impl BumpFrame {
let mut attributes = self.attributes_to_drop_before_reset.borrow_mut();
attributes.drain(..).for_each(|attribute| {
let attribute = unsafe { &*attribute };
match &attribute.value {
AttributeValue::Any(l) => {
_ = l.take();
}
_ => (),
if let AttributeValue::Any(l) = &attribute.value {
_ = l.take();
}
});
unsafe {