Skip to content

Commit

Permalink
Minor cleanup to validator: move single true case to top of match.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimblandy committed Sep 5, 2024
1 parent 1adbc7d commit 6c78051
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions naga/src/valid/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,10 @@ impl super::Validator {
let base_type = &resolver[base];
// See the documentation for `Expression::Access`.
let dynamic_indexing_restricted = match *base_type {
Ti::Vector { .. } | Ti::Array { .. } => false,
Ti::Matrix { .. } => true,
Ti::Pointer { .. }
Ti::Vector { .. }
| Ti::Array { .. }
| Ti::Pointer { .. }
| Ti::ValuePointer { size: Some(_), .. }
| Ti::BindingArray { .. } => false,
ref other => {
Expand Down

0 comments on commit 6c78051

Please sign in to comment.