mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Don't use std::opsIndex, used only when "validate" is on. (#2383)
In `src/valid/expresion.rs`, use the full path `std::ops::Index` when implementing the trait on `ExpressionTypeResolver`. This implementation is `#[cfg(feature = "validate")]`, so the `use` directive becomes unnecessary when that feature is not enabled, triggering warnings.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
use std::ops::Index;
|
||||
|
||||
#[cfg(feature = "validate")]
|
||||
use super::{
|
||||
compose::validate_compose, validate_atomic_compare_exchange_struct, FunctionInfo, ShaderStages,
|
||||
@@ -134,7 +132,7 @@ struct ExpressionTypeResolver<'a> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "validate")]
|
||||
impl<'a> Index<Handle<crate::Expression>> for ExpressionTypeResolver<'a> {
|
||||
impl<'a> std::ops::Index<Handle<crate::Expression>> for ExpressionTypeResolver<'a> {
|
||||
type Output = crate::TypeInner;
|
||||
|
||||
#[allow(clippy::panic)]
|
||||
|
||||
Reference in New Issue
Block a user