Skip to content

Commit

Permalink
fixup! refactor: split handle validation into early pass in `Validato…
Browse files Browse the repository at this point in the history
…r::validate`

Resolves <gfx-rs#2090 (comment)>.
  • Loading branch information
ErichDonGubler committed Dec 13, 2022
1 parent 53d8d06 commit f2f8e40
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/valid/analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,6 @@ impl ops::Index<Handle<crate::Expression>> for FunctionInfo {
}
}

impl ops::IndexMut<Handle<crate::Expression>> for FunctionInfo {
fn index_mut(&mut self, handle: Handle<crate::Expression>) -> &mut ExpressionInfo {
&mut self.expressions[handle.index()]
}
}

/// Disruptor of the uniform control flow.
#[derive(Clone, Copy, Debug, thiserror::Error)]
#[cfg_attr(test, derive(PartialEq))]
Expand Down Expand Up @@ -713,7 +707,7 @@ impl FunctionInfo {
};

let ty = resolve_context.resolve(expression, |h| Ok(&self[h].ty))?;
self[handle] = ExpressionInfo {
self.expressions[handle.index()] = ExpressionInfo {
uniformity,
ref_count: 0,
assignable_global,
Expand Down

0 comments on commit f2f8e40

Please sign in to comment.