diff options
author | 2023-11-14 11:43:38 +0100 | |
---|---|---|
committer | 2023-11-14 11:43:38 +0100 | |
commit | 33f626294452aefd1cd04f455fa1d1dfcb7f549e (patch) | |
tree | 2072075d371172532dd1ce5c54039360e137764f /examples | |
parent | 3e8ed05356dde17a6e31a0dc927a3c19b593b09a (diff) | |
download | iced-33f626294452aefd1cd04f455fa1d1dfcb7f549e.tar.gz iced-33f626294452aefd1cd04f455fa1d1dfcb7f549e.tar.bz2 iced-33f626294452aefd1cd04f455fa1d1dfcb7f549e.zip |
Fix `clippy` lints :crab:
Diffstat (limited to 'examples')
-rw-r--r-- | examples/custom_shader/src/cubes.rs | 2 | ||||
-rw-r--r-- | examples/custom_shader/src/pipeline.rs | 8 | ||||
-rw-r--r-- | examples/custom_shader/src/primitive.rs | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/examples/custom_shader/src/cubes.rs b/examples/custom_shader/src/cubes.rs index 8dbba4b1..00e608e3 100644 --- a/examples/custom_shader/src/cubes.rs +++ b/examples/custom_shader/src/cubes.rs @@ -65,7 +65,7 @@ impl Cubes { let new_len = self.cubes.len() - cubes_2_cut as usize; self.cubes.truncate(new_len); } - _ => {} + Ordering::Equal => {} } } } diff --git a/examples/custom_shader/src/pipeline.rs b/examples/custom_shader/src/pipeline.rs index eef1081d..44ad17a2 100644 --- a/examples/custom_shader/src/pipeline.rs +++ b/examples/custom_shader/src/pipeline.rs @@ -479,15 +479,15 @@ impl DepthPipeline { entry_point: "vs_main", buffers: &[], }, - primitive: Default::default(), + primitive: wgpu::PrimitiveState::default(), depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth32Float, depth_write_enabled: false, depth_compare: wgpu::CompareFunction::Less, - stencil: Default::default(), - bias: Default::default(), + stencil: wgpu::StencilState::default(), + bias: wgpu::DepthBiasState::default(), }), - multisample: Default::default(), + multisample: wgpu::MultisampleState::default(), fragment: Some(wgpu::FragmentState { module: &shader, entry_point: "fs_main", diff --git a/examples/custom_shader/src/primitive.rs b/examples/custom_shader/src/primitive.rs index 2201218f..f81ce95d 100644 --- a/examples/custom_shader/src/primitive.rs +++ b/examples/custom_shader/src/primitive.rs @@ -56,7 +56,7 @@ impl shader::Primitive for Primitive { storage: &mut shader::Storage, ) { if !storage.has::<Pipeline>() { - storage.store(Pipeline::new(device, queue, format, target_size)) + storage.store(Pipeline::new(device, queue, format, target_size)); } let pipeline = storage.get_mut::<Pipeline>().unwrap(); @@ -90,6 +90,6 @@ impl shader::Primitive for Primitive { bounds, self.cubes.len() as u32, self.show_depth_buffer, - ) + ); } } |