cargo fmt

0.19
Benjamin Hansen 1 month ago
parent 09c1024a8f
commit ce957226d3

@ -15,7 +15,8 @@ impl Texture {
device: &wgpu::Device,
config: &wgpu::SurfaceConfiguration,
label: &str,
) -> Self {let size = wgpu::Extent3d {
) -> Self {
let size = wgpu::Extent3d {
width: config.width.max(1),
height: config.height.max(1),
depth_or_array_layers: 1,

@ -312,7 +312,6 @@ impl<'a> State<'a> {
desired_maximum_frame_latency: 2,
};
let texture_bind_group_layout =
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
entries: &[

@ -403,7 +403,6 @@ impl<'a> State<'a> {
desired_maximum_frame_latency: 2,
};
let texture_bind_group_layout =
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
entries: &[

@ -403,7 +403,6 @@ impl<'a> State<'a> {
desired_maximum_frame_latency: 2,
};
let texture_bind_group_layout =
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
entries: &[

@ -283,7 +283,6 @@ impl<'a> State<'a> {
desired_maximum_frame_latency: 2,
};
let texture_bind_group_layout =
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
entries: &[

@ -300,7 +300,6 @@ impl<'a> State<'a> {
desired_maximum_frame_latency: 2,
};
let texture_bind_group_layout =
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
entries: &[
@ -713,9 +712,7 @@ impl<'a> State<'a> {
fn render(&mut self) -> Result<(), wgpu::SurfaceError> {
let output = self.surface.get_current_texture()?;
let view = output
.texture
.create_view(&wgpu::TextureViewDescriptor {
let view = output.texture.create_view(&wgpu::TextureViewDescriptor {
format: Some(self.config.format.add_srgb_suffix()),
..Default::default()
});

@ -300,7 +300,8 @@ impl HdrLoader {
pixels
};
#[cfg(target_arch = "wasm32")]
let pixels = hdr_decoder.read_image_native()?
let pixels = hdr_decoder
.read_image_native()?
.into_iter()
.map(|pix| {
let rgb = pix.to_hdr();

@ -284,7 +284,6 @@ impl<'a> State<'a> {
desired_maximum_frame_latency: 2,
};
let texture_bind_group_layout =
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
entries: &[

@ -222,7 +222,6 @@ impl<'a> State<'a> {
desired_maximum_frame_latency: 2,
};
let texture_bind_group_layout =
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
entries: &[

@ -288,7 +288,6 @@ impl<'a> State<'a> {
desired_maximum_frame_latency: 2,
};
let texture_bind_group_layout =
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
entries: &[

@ -158,7 +158,8 @@ pub fn start() {
let window = &window;
let mut last_time = instant::Instant::now();
event_loop.run(move |event, control_flow| {
event_loop
.run(move |event, control_flow| {
match event {
Event::WindowEvent {
event: WindowEvent::CloseRequested,
@ -264,7 +265,8 @@ pub fn start() {
}
_ => {}
}
}).unwrap();
})
.unwrap();
}
fn process_input(
@ -273,9 +275,7 @@ fn process_input(
control_flow: &EventLoopWindowTarget<()>,
) {
match (keycode, element_state) {
(KeyCode::Escape, ElementState::Pressed) => {
control_flow.exit()
}
(KeyCode::Escape, ElementState::Pressed) => control_flow.exit(),
_ => {}
}
}

@ -282,7 +282,6 @@ impl<'a> State<'a> {
view_formats: vec![],
};
let texture_bind_group_layout =
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
entries: &[

@ -1,4 +1,7 @@
use std::{path::PathBuf, process::{Command, ExitStatus}};
use std::{
path::PathBuf,
process::{Command, ExitStatus},
};
use anyhow::bail;
use rayon::prelude::{IntoParallelRefIterator, ParallelIterator};

Loading…
Cancel
Save