diff --git a/wgpu-core/src/binding_model.rs b/wgpu-core/src/binding_model.rs index 0a4fd65d6..c33f00ca9 100644 --- a/wgpu-core/src/binding_model.rs +++ b/wgpu-core/src/binding_model.rs @@ -395,6 +395,7 @@ pub struct BindGroupLayout { pub(crate) multi_ref_count: MultiRefCount, pub(crate) entries: BindEntryMap, pub(crate) desc_count: DescriptorTotalCount, + #[allow(dead_code)] pub(crate) dynamic_count: usize, pub(crate) count_validator: BindingTypeMaxCountValidator, #[cfg(debug_assertions)] @@ -595,7 +596,7 @@ impl Resource for PipelineLayout { } #[repr(C)] -#[derive(Clone, Debug, Hash, PartialEq)] +#[derive(Clone, Debug, Hash, Eq, PartialEq)] #[cfg_attr(feature = "trace", derive(Serialize))] #[cfg_attr(feature = "replay", derive(Deserialize))] pub struct BufferBinding { diff --git a/wgpu-core/src/command/bundle.rs b/wgpu-core/src/command/bundle.rs index ea25c6efd..05b4626cc 100644 --- a/wgpu-core/src/command/bundle.rs +++ b/wgpu-core/src/command/bundle.rs @@ -663,7 +663,7 @@ impl RenderBundle { &pipeline_layout.raw, conv::map_shader_stage_flags(stages), offset, - &data_slice, + data_slice, ) } else { super::push_constant_clear( diff --git a/wgpu-core/src/command/compute.rs b/wgpu-core/src/command/compute.rs index 7a461d7c5..d9c2256d4 100644 --- a/wgpu-core/src/command/compute.rs +++ b/wgpu-core/src/command/compute.rs @@ -113,7 +113,7 @@ pub struct ComputePassDescriptor<'a> { pub label: Label<'a>, } -#[derive(Clone, Debug, Error, PartialEq)] +#[derive(Clone, Debug, Error, Eq, PartialEq)] pub enum DispatchError { #[error("compute pipeline must be set")] MissingPipeline, @@ -291,7 +291,7 @@ impl Global { }); } - if let Some(ref label) = base.label { + if let Some(label) = base.label { unsafe { raw.begin_debug_marker(label, 0); } diff --git a/wgpu-core/src/command/draw.rs b/wgpu-core/src/command/draw.rs index 7c40603df..e9134607b 100644 --- a/wgpu-core/src/command/draw.rs +++ b/wgpu-core/src/command/draw.rs @@ -20,7 +20,7 @@ use thiserror::Error; pub type BufferError = UseExtendError; /// Error validating a draw call. -#[derive(Clone, Debug, Error, PartialEq)] +#[derive(Clone, Debug, Error, Eq, PartialEq)] pub enum DrawError { #[error("blend constant needs to be set")] MissingBlendConstant, diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index 974fe3ff5..74f7e7c93 100644 --- a/wgpu-core/src/command/render.rs +++ b/wgpu-core/src/command/render.rs @@ -77,7 +77,7 @@ pub enum StoreOp { /// Describes an individual channel within a render pass, such as color, depth, or stencil. #[repr(C)] -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)] #[cfg_attr(any(feature = "serial-pass", feature = "trace"), derive(Serialize))] #[cfg_attr(any(feature = "serial-pass", feature = "replay"), derive(Deserialize))] pub struct PassChannel { @@ -567,7 +567,7 @@ impl<'a, B: GfxBackend> RenderPassInfo<'a, B> { let view = cmd_buf .trackers .views - .use_extend(&*view_guard, at.view, (), ()) + .use_extend(view_guard, at.view, (), ()) .map_err(|_| RenderPassErrorInner::InvalidAttachment(at.view))?; add_view(view, "depth")?; @@ -631,7 +631,7 @@ impl<'a, B: GfxBackend> RenderPassInfo<'a, B> { let view = cmd_buf .trackers .views - .use_extend(&*view_guard, at.view, (), ()) + .use_extend(view_guard, at.view, (), ()) .map_err(|_| RenderPassErrorInner::InvalidAttachment(at.view))?; add_view(view, "color")?; @@ -695,7 +695,7 @@ impl<'a, B: GfxBackend> RenderPassInfo<'a, B> { let view = cmd_buf .trackers .views - .use_extend(&*view_guard, resolve_target, (), ()) + .use_extend(view_guard, resolve_target, (), ()) .map_err(|_| RenderPassErrorInner::InvalidAttachment(resolve_target))?; if extent != Some(view.extent) { return Err(RenderPassErrorInner::AttachmentsDimensionMismatch { @@ -864,7 +864,7 @@ impl<'a, B: GfxBackend> RenderPassInfo<'a, B> { device .raw .create_framebuffer( - &render_pass, + render_pass, e.key().attachments.all().cloned(), conv::map_extent(&extent, wgt::TextureDimension::D3), ) @@ -1067,7 +1067,7 @@ impl Global { let device = &device_guard[cmd_buf.device_id.value]; let mut raw = device.cmd_allocator.extend(cmd_buf); unsafe { - if let Some(ref label) = base.label { + if let Some(label) = base.label { device.raw.set_command_buffer_name(&mut raw, label); } raw.begin_primary(hal::command::CommandBufferFlags::ONE_TIME_SUBMIT); @@ -1438,10 +1438,8 @@ impl Global { use std::{convert::TryFrom, i16}; if rect.w <= 0.0 || rect.h <= 0.0 - || depth_min < 0.0 - || depth_min > 1.0 - || depth_max < 0.0 - || depth_max > 1.0 + || !(0.0..=1.0).contains(&depth_min) + || !(0.0..=1.0).contains(&depth_max) { return Err(RenderCommandError::InvalidViewport).map_pass_err(scope); } diff --git a/wgpu-core/src/device/life.rs b/wgpu-core/src/device/life.rs index 9bda67e87..2addd17fa 100644 --- a/wgpu-core/src/device/life.rs +++ b/wgpu-core/src/device/life.rs @@ -324,7 +324,7 @@ impl LifetimeTracker { .active .iter() .position(|a| unsafe { !device.get_fence_status(&a.fence).unwrap_or(false) }) - .unwrap_or_else(|| self.active.len()); + .unwrap_or(self.active.len()); let last_done = match done_count.checked_sub(1) { Some(i) => self.active[i].index, None => return Ok(0), diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index d6061a7fc..5a03bf6c1 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -80,7 +80,7 @@ pub fn all_image_stages() -> hal::pso::PipelineStage { } #[repr(C)] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] #[cfg_attr(feature = "trace", derive(serde::Serialize))] #[cfg_attr(feature = "replay", derive(serde::Deserialize))] pub enum HostMap { @@ -454,13 +454,13 @@ impl Device { &'this mut self, hub: &Hub, trackers: &TrackerSet, - mut token: &mut Token<'token, Self>, + token: &mut Token<'token, Self>, ) { self.temp_suspected.clear(); // As the tracker is cleared/dropped, we need to consider all the resources // that it references for destruction in the next GC pass. { - let (bind_group_guard, mut token) = hub.bind_groups.read(&mut token); + let (bind_group_guard, mut token) = hub.bind_groups.read(token); let (compute_pipe_guard, mut token) = hub.compute_pipelines.read(&mut token); let (render_pipe_guard, mut token) = hub.render_pipelines.read(&mut token); let (query_set_guard, mut token) = hub.query_sets.read(&mut token); @@ -511,7 +511,7 @@ impl Device { } } - self.lock_life(&mut token) + self.lock_life(token) .suspected_resources .extend(&self.temp_suspected); @@ -1178,7 +1178,7 @@ impl Device { ) -> Option { guard .iter(self_id.backend()) - .find(|&(_, ref bgl)| bgl.device_id.value.0 == self_id && bgl.entries == *entry_map) + .find(|&(_, bgl)| bgl.device_id.value.0 == self_id && bgl.entries == *entry_map) .map(|(id, value)| { value.multi_ref_count.inc(); id @@ -1496,9 +1496,9 @@ impl Device { let descriptors: SmallVec<[_; 1]> = match entry.resource { Br::Buffer(ref bb) => { let buffer_desc = Self::create_buffer_descriptor( - &bb, + bb, binding, - &decl, + decl, &mut used_buffer_ranges, &mut dynamic_binding_info, &mut used, @@ -1525,9 +1525,9 @@ impl Device { .iter() .map(|bb| { Self::create_buffer_descriptor( - &bb, + bb, binding, - &decl, + decl, &mut used_buffer_ranges, &mut dynamic_binding_info, &mut used, @@ -1782,7 +1782,7 @@ impl Device { // Set the descriptor set's label for easier debugging. if let Some(label) = desc.label.as_ref() { unsafe { - self.raw.set_descriptor_set_name(desc_set.raw_mut(), &label); + self.raw.set_descriptor_set_name(desc_set.raw_mut(), label); } } @@ -2029,7 +2029,7 @@ impl Device { let _ = interface.check_stage( provided_layouts.as_ref().map(|p| p.as_slice()), &mut derived_group_layouts, - &entry_point_name, + entry_point_name, flag, io, )?; @@ -2038,7 +2038,7 @@ impl Device { } let shader = hal::pso::EntryPoint:: { - entry: &entry_point_name, // TODO + entry: entry_point_name, // TODO module: &shader_module.raw, specialization: hal::pso::Specialization::EMPTY, }; @@ -2457,7 +2457,7 @@ impl Device { .check_stage( provided_layouts.as_ref().map(|p| p.as_slice()), &mut derived_group_layouts, - &entry_point_name, + entry_point_name, flag, io, ) @@ -2470,7 +2470,7 @@ impl Device { } Some(hal::pso::EntryPoint:: { - entry: &entry_point_name, + entry: entry_point_name, module: &shader_module.raw, specialization: hal::pso::Specialization::EMPTY, }) @@ -2481,7 +2481,7 @@ impl Device { if validated_stages.contains(wgt::ShaderStage::FRAGMENT) { for (i, state) in color_states.iter().enumerate() { match io.get(&(i as wgt::ShaderLocation)) { - Some(ref output) => { + Some(output) => { validation::check_texture_format(state.format, &output.ty).map_err( |pipeline| { pipeline::CreateRenderPipelineError::ColorState( @@ -3776,16 +3776,12 @@ impl Global { Ok(layout) => layout, Err(_) => break binding_model::CreateBindGroupError::InvalidLayout, }; - let bind_group = match device.create_bind_group( - device_id, - bind_group_layout, - desc, - &hub, - &mut token, - ) { - Ok(bind_group) => bind_group, - Err(e) => break e, - }; + let bind_group = + match device.create_bind_group(device_id, bind_group_layout, desc, hub, &mut token) + { + Ok(bind_group) => bind_group, + Err(e) => break e, + }; let ref_count = bind_group.life_guard.add_ref(); let id = fid.assign(bind_group, &mut token); @@ -3963,10 +3959,10 @@ impl Global { Err(e) => break e, }; - let mut raw = command_buffer.raw.first_mut().unwrap(); + let raw = command_buffer.raw.first_mut().unwrap(); unsafe { if let Some(ref label) = desc.label { - device.raw.set_command_buffer_name(&mut raw, label); + device.raw.set_command_buffer_name(raw, label); } raw.begin_primary(hal::command::CommandBufferFlags::ONE_TIME_SUBMIT); } @@ -3995,7 +3991,7 @@ impl Global { .unregister(command_encoder_id, &mut token); if let Some(cmdbuf) = cmdbuf { let device = &mut device_guard[cmdbuf.device_id.value]; - device.untrack::(&hub, &cmdbuf.trackers, &mut token); + device.untrack::(hub, &cmdbuf.trackers, &mut token); device.cmd_allocator.discard(cmdbuf); } } @@ -4051,7 +4047,7 @@ impl Global { }); } - let render_bundle = match bundle_encoder.finish(desc, device, &hub, &mut token) { + let render_bundle = match bundle_encoder.finish(desc, device, hub, &mut token) { Ok(bundle) => bundle, Err(e) => break e, }; @@ -4199,7 +4195,7 @@ impl Global { let mut token = Token::root(); let fid = hub.render_pipelines.prepare(id_in); - let implicit_context = implicit_pipeline_ids.map(|ipi| ipi.prepare(&hub)); + let implicit_context = implicit_pipeline_ids.map(|ipi| ipi.prepare(hub)); let (adapter_guard, mut token) = hub.adapters.read(&mut token); let (device_guard, mut token) = hub.devices.read(&mut token); @@ -4223,7 +4219,7 @@ impl Global { adapter, desc, implicit_context, - &hub, + hub, &mut token, ) { Ok(pair) => pair, @@ -4333,7 +4329,7 @@ impl Global { let mut token = Token::root(); let fid = hub.compute_pipelines.prepare(id_in); - let implicit_context = implicit_pipeline_ids.map(|ipi| ipi.prepare(&hub)); + let implicit_context = implicit_pipeline_ids.map(|ipi| ipi.prepare(hub)); let (device_guard, mut token) = hub.devices.read(&mut token); let error = loop { @@ -4354,7 +4350,7 @@ impl Global { device_id, desc, implicit_context, - &hub, + hub, &mut token, ) { Ok(pair) => pair, @@ -4530,11 +4526,8 @@ impl Global { let num_frames = swap_chain::DESIRED_NUM_FRAMES .max(*caps.image_count.start()) .min(*caps.image_count.end()); - let mut config = swap_chain::swap_chain_descriptor_to_hal( - &desc, - num_frames, - device.private_features, - ); + let mut config = + swap_chain::swap_chain_descriptor_to_hal(desc, num_frames, device.private_features); if let Some(formats) = formats { if !formats.contains(&config.format) { break swap_chain::CreateSwapChainError::UnsupportedFormat { @@ -4603,7 +4596,7 @@ impl Global { let (device_guard, mut token) = hub.devices.read(&mut token); let device = device_guard.get(device_id).map_err(|_| InvalidDevice)?; device.lock_life(&mut token).triage_suspected( - &hub, + hub, &device.trackers, #[cfg(feature = "trace")] None, @@ -4624,7 +4617,7 @@ impl Global { device_guard .get(device_id) .map_err(|_| DeviceError::Invalid)? - .maintain(&hub, force_wait, &mut token)? + .maintain(hub, force_wait, &mut token)? }; fire_map_callbacks(callbacks); Ok(()) @@ -4641,7 +4634,7 @@ impl Global { let mut token = Token::root(); let (device_guard, mut token) = hub.devices.read(&mut token); for (_, device) in device_guard.iter(B::VARIANT) { - let cbs = device.maintain(&hub, force_wait, &mut token)?; + let cbs = device.maintain(hub, force_wait, &mut token)?; callbacks.extend(cbs); } Ok(()) diff --git a/wgpu-core/src/device/queue.rs b/wgpu-core/src/device/queue.rs index d9a9e48a9..5ff440f5d 100644 --- a/wgpu-core/src/device/queue.rs +++ b/wgpu-core/src/device/queue.rs @@ -797,7 +797,7 @@ impl Global { .after_submit_internal(comb_raw, submit_index); } - let callbacks = match device.maintain(&hub, false, &mut token) { + let callbacks = match device.maintain(hub, false, &mut token) { Ok(callbacks) => callbacks, Err(WaitIdleError::Device(err)) => return Err(QueueSubmitError::Queue(err)), Err(WaitIdleError::StuckGpu) => return Err(QueueSubmitError::StuckGpu), diff --git a/wgpu-core/src/hub.rs b/wgpu-core/src/hub.rs index 3d92bfeb6..2b02a0fca 100644 --- a/wgpu-core/src/hub.rs +++ b/wgpu-core/src/hub.rs @@ -29,21 +29,12 @@ use std::cell::Cell; use std::{fmt::Debug, marker::PhantomData, ops}; /// A simple structure to manage identities of objects. -#[derive(Debug)] +#[derive(Debug, Default)] pub struct IdentityManager { free: Vec, epochs: Vec, } -impl Default for IdentityManager { - fn default() -> Self { - Self { - free: Default::default(), - epochs: Default::default(), - } - } -} - impl IdentityManager { pub fn from_index(min_index: u32) -> Self { Self { diff --git a/wgpu-core/src/memory_init_tracker.rs b/wgpu-core/src/memory_init_tracker.rs index b24046524..00df87f75 100644 --- a/wgpu-core/src/memory_init_tracker.rs +++ b/wgpu-core/src/memory_init_tracker.rs @@ -134,7 +134,7 @@ impl MemoryInitTracker { let index = self.lower_bound(query_range.start); self.uninitialized_ranges .get(index) - .map(|start_range| { + .and_then(|start_range| { if start_range.start < query_range.end { let start = start_range.start.max(query_range.start); match self.uninitialized_ranges.get(index + 1) { @@ -152,7 +152,6 @@ impl MemoryInitTracker { None } }) - .flatten() } // Drains uninitialized ranges in a query range. diff --git a/wgpu-core/src/resource.rs b/wgpu-core/src/resource.rs index 171ae4bac..0f4123ee7 100644 --- a/wgpu-core/src/resource.rs +++ b/wgpu-core/src/resource.rs @@ -163,6 +163,7 @@ pub enum BufferAccessError { pub(crate) struct BufferPendingMapping { pub range: Range, pub op: BufferMapOperation, + #[allow(dead_code)] // hold the parent alive while the mapping is active pub parent_ref_count: RefCount, } @@ -280,7 +281,7 @@ impl Borrow for Texture { } /// Describes a [`TextureView`]. -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, Eq, PartialEq)] #[cfg_attr(feature = "trace", derive(serde::Serialize))] #[cfg_attr(feature = "replay", derive(serde::Deserialize), serde(default))] pub struct TextureViewDescriptor<'a> { @@ -479,6 +480,7 @@ pub struct QuerySet { /// Amount of queries in the query set. pub(crate) desc: wgt::QuerySetDescriptor, /// Amount of numbers in each query (i.e. a pipeline statistics query for two attributes will have this number be two) + #[allow(dead_code)] pub(crate) elements: u32, } diff --git a/wgpu-core/src/swap_chain.rs b/wgpu-core/src/swap_chain.rs index 8156efd5a..568e8ed7c 100644 --- a/wgpu-core/src/swap_chain.rs +++ b/wgpu-core/src/swap_chain.rs @@ -56,6 +56,7 @@ pub struct SwapChain { pub(crate) life_guard: LifeGuard, pub(crate) device_id: Stored, pub(crate) desc: SwapChainDescriptor, + #[allow(dead_code)] pub(crate) num_frames: hal::window::SwapImageIndex, pub(crate) semaphore: B::Semaphore, pub(crate) acquired_view_id: Option>, diff --git a/wgpu-core/src/track/mod.rs b/wgpu-core/src/track/mod.rs index 872e16188..b387402e9 100644 --- a/wgpu-core/src/track/mod.rs +++ b/wgpu-core/src/track/mod.rs @@ -20,7 +20,7 @@ pub(crate) use texture::{TextureSelector, TextureState}; /// A single unit of state tracking. It keeps an initial /// usage as well as the last/current one, similar to `Range`. -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] pub struct Unit { first: Option, last: U, diff --git a/wgpu-core/src/track/range.rs b/wgpu-core/src/track/range.rs index 8ba4be706..aac78ae39 100644 --- a/wgpu-core/src/track/range.rs +++ b/wgpu-core/src/track/range.rs @@ -9,7 +9,7 @@ use std::{cmp::Ordering, fmt::Debug, iter, ops::Range, slice::Iter}; /// Structure that keeps track of a I -> T mapping, /// optimized for a case where keys of the same values /// are often grouped together linearly. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)] pub struct RangedStates { /// List of ranges, each associated with a singe value. /// Ranges of keys have to be non-intersecting and ordered. diff --git a/wgpu-core/src/validation.rs b/wgpu-core/src/validation.rs index ffcb8b063..d6419efd0 100644 --- a/wgpu-core/src/validation.rs +++ b/wgpu-core/src/validation.rs @@ -25,6 +25,7 @@ enum ResourceType { #[derive(Debug)] struct Resource { + #[allow(dead_code)] name: Option, bind: naga::ResourceBinding, ty: ResourceType, @@ -94,6 +95,7 @@ enum Varying { BuiltIn(naga::BuiltIn), } +#[allow(dead_code)] #[derive(Debug)] struct SpecializationConstant { id: u32, @@ -105,6 +107,7 @@ struct EntryPoint { inputs: Vec, outputs: Vec, resources: Vec<(naga::Handle, GlobalUse)>, + #[allow(dead_code)] spec_constants: Vec, sampling_pairs: FastHashSet<(naga::Handle, naga::Handle)>, } diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index 28cf549ef..5204683dd 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -716,7 +716,7 @@ pub enum ShaderModel { /// Supported physical device types. #[repr(u8)] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] #[cfg_attr(feature = "trace", derive(serde::Serialize))] #[cfg_attr(feature = "replay", derive(serde::Deserialize))] pub enum DeviceType { @@ -733,7 +733,7 @@ pub enum DeviceType { } /// Information about an adapter. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)] #[cfg_attr(feature = "trace", derive(serde::Serialize))] #[cfg_attr(feature = "replay", derive(serde::Deserialize))] pub struct AdapterInfo { @@ -3004,7 +3004,7 @@ pub struct ImageCopyTexture { /// Subresource range within an image #[repr(C)] -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, Eq, PartialEq)] #[cfg_attr(feature = "trace", derive(serde::Serialize))] #[cfg_attr(feature = "replay", derive(serde::Deserialize))] pub struct ImageSubresourceRange { diff --git a/wgpu/src/backend/direct.rs b/wgpu/src/backend/direct.rs index 96bef1909..94ed9db7e 100644 --- a/wgpu/src/backend/direct.rs +++ b/wgpu/src/backend/direct.rs @@ -968,7 +968,7 @@ impl crate::Context for Context { let descriptor = wgc::binding_model::PipelineLayoutDescriptor { label: desc.label.map(Borrowed), bind_group_layouts: Borrowed(&temp_layouts), - push_constant_ranges: Borrowed(&desc.push_constant_ranges), + push_constant_ranges: Borrowed(desc.push_constant_ranges), }; let global = &self.0; @@ -1211,7 +1211,7 @@ impl crate::Context for Context { let global = &self.0; let (id, error) = wgc::gfx_select!(device.id => global.device_create_query_set( device.id, - &desc, + desc, PhantomData )); if let Some(cause) = error { @@ -1818,7 +1818,7 @@ impl crate::Context for Context { fn command_encoder_insert_debug_marker(&self, encoder: &Self::CommandEncoderId, label: &str) { let global = &self.0; - if let Err(cause) = wgc::gfx_select!(encoder.id => global.command_encoder_insert_debug_marker(encoder.id, &label)) + if let Err(cause) = wgc::gfx_select!(encoder.id => global.command_encoder_insert_debug_marker(encoder.id, label)) { self.handle_error_nolabel( &encoder.error_sink, @@ -1829,7 +1829,7 @@ impl crate::Context for Context { } fn command_encoder_push_debug_group(&self, encoder: &Self::CommandEncoderId, label: &str) { let global = &self.0; - if let Err(cause) = wgc::gfx_select!(encoder.id => global.command_encoder_push_debug_group(encoder.id, &label)) + if let Err(cause) = wgc::gfx_select!(encoder.id => global.command_encoder_push_debug_group(encoder.id, label)) { self.handle_error_nolabel( &encoder.error_sink, diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index e3068a95d..440afb930 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -1082,7 +1082,7 @@ pub type RenderBundleDescriptor<'a> = wgt::RenderBundleDescriptor>; pub type TextureDescriptor<'a> = wgt::TextureDescriptor>; /// Describes a [`TextureView`]. -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct TextureViewDescriptor<'a> { /// Debug label of the texture view. This will show up in graphics debuggers for easy identification. pub label: Label<'a>, @@ -1722,7 +1722,7 @@ impl Display for BufferAsyncError { impl error::Error for BufferAsyncError {} /// Type of buffer mapping. -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, Copy, Eq, PartialEq)] pub enum MapMode { /// Map only for reading Read,