Fix clippy::unneeded_struct_pattern lints (#7136)

This commit is contained in:
Bruce Mitchener authored and GitHub committed 2025-02-14 01:32:21 -05:00
1 parent ab38df24ba
commit bae0e70e8d
6 files changed
+9 -11

No files matched your search

+2 -2
View File
@@ -222,7 +222,7 @@ impl ContinueCtx {
// forward continue statements within this `Switch`. We can leave
// the stack empty.
None => None,
Some(&Nesting::Loop { .. }) => {
Some(&Nesting::Loop) => {
let variable = Rc::new(namer.call("should_continue"));
self.stack.push(Nesting::Switch {
variable: Rc::clone(&variable),
@@ -253,7 +253,7 @@ impl ContinueCtx {
// This doesn't indicate a problem: we don't start pushing entries
// for `Switch` statements unless we have an enclosing `Loop`.
None => ExitControlFlow::None,
Some(Nesting::Loop { .. }) => {
Some(Nesting::Loop) => {
unreachable!("Unexpected loop state when exiting switch");
}
Some(Nesting::Switch {
+1 -1
View File
@@ -263,7 +263,7 @@ impl crate::TypeInner {
match *self {
crate::TypeInner::Image { .. }
| crate::TypeInner::Sampler { .. }
| crate::TypeInner::AccelerationStructure { .. } => true,
| crate::TypeInner::AccelerationStructure => true,
_ => false,
}
}
+2 -2
View File
@@ -5286,13 +5286,13 @@ template <typename A>
LocationMode::VertexOutput,
true,
),
crate::ShaderStage::Fragment { .. } => (
crate::ShaderStage::Fragment => (
"fragment",
LocationMode::FragmentInput,
LocationMode::FragmentOutput,
false,
),
crate::ShaderStage::Compute { .. } => (
crate::ShaderStage::Compute => (
"kernel",
LocationMode::Uniform,
LocationMode::Uniform,
+1 -3
View File
@@ -957,9 +957,7 @@ impl<'a> ConstantEvaluator<'a> {
Expression::RayQueryProceedResult | Expression::RayQueryGetIntersection { .. } => {
Err(ConstantEvaluatorError::RayQueryExpression)
}
Expression::SubgroupBallotResult { .. } => {
Err(ConstantEvaluatorError::SubgroupExpression)
}
Expression::SubgroupBallotResult => Err(ConstantEvaluatorError::SubgroupExpression),
Expression::SubgroupOperationResult { .. } => {
Err(ConstantEvaluatorError::SubgroupExpression)
}
+1 -1
View File
@@ -1107,7 +1107,7 @@ fn invalid_functions() {
Err(naga::valid::ValidationError::Type {
source: naga::valid::TypeError::InvalidPointerToUnsized {
base: _,
space: naga::AddressSpace::WorkGroup { .. },
space: naga::AddressSpace::WorkGroup,
},
..
})
+2 -2
View File
@@ -35,7 +35,7 @@ impl From<&ResourceType> for BindingTypeName {
ResourceType::Buffer { .. } => BindingTypeName::Buffer,
ResourceType::Texture { .. } => BindingTypeName::Texture,
ResourceType::Sampler { .. } => BindingTypeName::Sampler,
ResourceType::AccelerationStructure { .. } => BindingTypeName::AccelerationStructure,
ResourceType::AccelerationStructure => BindingTypeName::AccelerationStructure,
}
}
}
@@ -47,7 +47,7 @@ impl From<&BindingType> for BindingTypeName {
BindingType::Texture { .. } => BindingTypeName::Texture,
BindingType::StorageTexture { .. } => BindingTypeName::Texture,
BindingType::Sampler { .. } => BindingTypeName::Sampler,
BindingType::AccelerationStructure { .. } => BindingTypeName::AccelerationStructure,
BindingType::AccelerationStructure => BindingTypeName::AccelerationStructure,
}
}
}