fix: apply some clippy lints and rename the liveview methods to not intersect

This commit is contained in:
Jonathan Kelley committed 2022-06-20 02:24:39 -04:00
1 parent c3e573b7cb
commit 8be66bd34d
14 files changed
+58 -76

No files matched your search

+1 -1
View File
@@ -74,7 +74,7 @@ impl NodeDepState for Focus {
if let Some(index) = a
.value
.as_int32()
.or(a.value.as_text().and_then(|v| v.parse::<i32>().ok()))
.or_else(|| a.value.as_text().and_then(|v| v.parse::<i32>().ok()))
{
match index.cmp(&0) {
Ordering::Less => FocusLevel::Unfocusable,
+2 -4
View File
@@ -545,11 +545,9 @@ impl InnerInputState {
}
fn get_abs_layout(node: &Node, dom: &Dom, taffy: &Taffy) -> Layout {
let mut node_layout = taffy
.layout(node.state.layout.node.unwrap())
.unwrap()
.clone();
let mut node_layout = *taffy.layout(node.state.layout.node.unwrap()).unwrap();
let mut current = node;
while let Some(parent_id) = current.parent {
let parent = &dom[parent_id];
current = parent;