summaryrefslogtreecommitdiffstats
path: root/wgpu/src/triangle.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2023-09-20 15:52:41 +0200
committerLibravatar GitHub <noreply@github.com>2023-09-20 15:52:41 +0200
commit2f7ff1471d1f6119c769c77fa138a63e95b5d881 (patch)
tree83f20609fa20d534ef8bd32b3851cae03cbadbb2 /wgpu/src/triangle.rs
parente8b01eb5435500c4b4d3135dde3d9e5910aca89e (diff)
parent33d780f691829ecd32f3a218008fcb40e005deb4 (diff)
downloadiced-2f7ff1471d1f6119c769c77fa138a63e95b5d881.tar.gz
iced-2f7ff1471d1f6119c769c77fa138a63e95b5d881.tar.bz2
iced-2f7ff1471d1f6119c769c77fa138a63e95b5d881.zip
Merge pull request #2096 from iced-rs/fix/some-more-lints
Fix some `clippy::pedantic` lints
Diffstat (limited to 'wgpu/src/triangle.rs')
-rw-r--r--wgpu/src/triangle.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/wgpu/src/triangle.rs b/wgpu/src/triangle.rs
index 7e1bd9cc..f8014ceb 100644
--- a/wgpu/src/triangle.rs
+++ b/wgpu/src/triangle.rs
@@ -329,12 +329,12 @@ impl Pipeline {
fn fragment_target(
texture_format: wgpu::TextureFormat,
-) -> Option<wgpu::ColorTargetState> {
- Some(wgpu::ColorTargetState {
+) -> wgpu::ColorTargetState {
+ wgpu::ColorTargetState {
format: texture_format,
blend: Some(wgpu::BlendState::ALPHA_BLENDING),
write_mask: wgpu::ColorWrites::ALL,
- })
+ }
}
fn primitive_state() -> wgpu::PrimitiveState {
@@ -521,7 +521,7 @@ mod solid {
fragment: Some(wgpu::FragmentState {
module: &shader,
entry_point: "solid_fs_main",
- targets: &[triangle::fragment_target(format)],
+ targets: &[Some(triangle::fragment_target(format))],
}),
primitive: triangle::primitive_state(),
depth_stencil: None,
@@ -698,7 +698,7 @@ mod gradient {
fragment: Some(wgpu::FragmentState {
module: &shader,
entry_point: "gradient_fs_main",
- targets: &[triangle::fragment_target(format)],
+ targets: &[Some(triangle::fragment_target(format))],
}),
primitive: triangle::primitive_state(),
depth_stencil: None,