Fix formatting with cargo fmt

This commit is contained in:
Héctor Ramón 2021-05-19 16:26:04 +07:00
parent 983aa1b366
commit 8b7452a55d
3 changed files with 6 additions and 10 deletions

View File

@ -78,8 +78,7 @@ where
.drain(..) .drain(..)
.map(|recipe| { .map(|recipe| {
Box::new(With::new(recipe, value.clone())) Box::new(With::new(recipe, value.clone()))
as as Box<dyn Recipe<H, E, Output = (T, O)>>
Box<dyn Recipe<H, E, Output = (T, O)>>
}) })
.collect(), .collect(),
} }

View File

@ -209,11 +209,10 @@ where
cursor_position: Point, cursor_position: Point,
messages: &mut Vec<Message>, messages: &mut Vec<Message>,
) { ) {
let mut clicked_region = self let mut clicked_region =
.elements self.elements.iter().zip(layout.children()).filter(
.iter() |(_, layout)| layout.bounds().contains(cursor_position),
.zip(layout.children()) );
.filter(|(_, layout)| layout.bounds().contains(cursor_position));
if let Some(((pane, content), layout)) = clicked_region.next() { if let Some(((pane, content), layout)) = clicked_region.next() {
if let Some(on_click) = &self.on_click { if let Some(on_click) = &self.on_click {

View File

@ -263,8 +263,7 @@ impl Pipeline {
Uniforms, Uniforms,
>( >(
) )
as as u64),
u64),
}, },
}], }],
}); });
@ -334,7 +333,6 @@ impl Pipeline {
let uniforms = bytemuck::cast_slice(&uniforms); let uniforms = bytemuck::cast_slice(&uniforms);
if let Some(uniforms_size) = if let Some(uniforms_size) =
wgpu::BufferSize::new(uniforms.len() as u64) wgpu::BufferSize::new(uniforms.len() as u64)
{ {