Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
turai committed Sep 11, 2023
1 parent 3e2daf7 commit 907e839
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions src/native/card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,29 +561,29 @@ where
}

fn overlay<'b>(
&'b mut self,
tree: &'b mut Tree,
layout: Layout<'_>,
renderer: &Renderer,
) -> Option<core::overlay::Element<'b, Message, Renderer>> {
let mut children = vec![&mut self.head, &mut self.body];
if let Some(foot) = &mut self.foot {
children.push(foot);
}
let children = children
.into_iter()
.zip(&mut tree.children)
.zip(layout.children())
.filter_map(|((child, state), layout)| {
layout.children().next().and_then(|child_layout| {
child.as_widget_mut().overlay(state, child_layout, renderer)
})
&'b mut self,
tree: &'b mut Tree,
layout: Layout<'_>,
renderer: &Renderer,
) -> Option<core::overlay::Element<'b, Message, Renderer>> {
let mut children = vec![&mut self.head, &mut self.body];
if let Some(foot) = &mut self.foot {
children.push(foot);
}
let children = children
.into_iter()
.zip(&mut tree.children)
.zip(layout.children())
.filter_map(|((child, state), layout)| {
layout.children().next().and_then(|child_layout| {
child.as_widget_mut().overlay(state, child_layout, renderer)
})
.collect::<Vec<_>>();
})
.collect::<Vec<_>>();

(!children.is_empty()).then(|| core::overlay::Group::with_children(children).overlay())
}
(!children.is_empty()).then(|| core::overlay::Group::with_children(children).overlay())
}
}

/// Calculates the layout of the head.
fn head_node<Message, Renderer>(
Expand Down

0 comments on commit 907e839

Please sign in to comment.