From d95e25f3990f6741a4e453f6a8e304a328f743d3 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 12 Aug 2024 11:43:07 +0100 Subject: [PATCH] chore: remove `std::mem::*` imports now unnecessary with Rust 1.80 `std::mem::{size,align}_of{,_val}` was added to `std::prelude` in Rust 1.80; see [`rust`#123168](https://github.com/rust-lang/rust/pull/123168/). --- examples/src/boids/mod.rs | 2 +- examples/src/cube/mod.rs | 2 +- examples/src/hello_compute/mod.rs | 2 +- examples/src/hello_synchronization/mod.rs | 2 -- examples/src/hello_workgroups/mod.rs | 2 -- examples/src/mipmap/mod.rs | 2 +- examples/src/msaa_line/mod.rs | 2 +- examples/src/repeated_compute/mod.rs | 2 -- examples/src/shadow/mod.rs | 2 +- examples/src/skybox/mod.rs | 2 +- examples/src/stencil_triangles/mod.rs | 1 - examples/src/storage_texture/mod.rs | 2 -- examples/src/texture_arrays/mod.rs | 5 +---- examples/src/timestamp_queries/mod.rs | 2 -- examples/src/uniform_values/mod.rs | 2 +- examples/src/water/mod.rs | 2 +- naga/src/back/msl/mod.rs | 1 - player/tests/test.rs | 1 - tests/tests/compute_pass_ownership.rs | 2 +- tests/tests/occlusion_query/mod.rs | 2 +- tests/tests/render_pass_ownership.rs | 2 +- tests/tests/subgroup_operations/mod.rs | 2 +- tests/tests/vertex_formats/mod.rs | 2 +- tests/tests/vertex_indices/mod.rs | 2 +- wgpu-core/src/command/bundle.rs | 2 +- wgpu-core/src/command/compute.rs | 2 +- wgpu-core/src/command/render.rs | 2 +- wgpu-core/src/id.rs | 1 - wgpu-core/src/pipeline_cache.rs | 2 -- wgpu-core/src/registry.rs | 2 +- wgpu-hal/examples/halmark/main.rs | 4 +--- wgpu-hal/examples/ray-traced-triangle/main.rs | 4 +--- wgpu-hal/src/dx12/adapter.rs | 7 +------ wgpu-hal/src/dx12/device.rs | 3 +-- wgpu-hal/src/dx12/instance.rs | 2 +- wgpu-hal/src/gles/command.rs | 5 +---- wgpu-hal/src/gles/queue.rs | 1 - wgpu-hal/src/gles/wgl.rs | 2 +- wgpu-hal/src/metal/command.rs | 2 +- wgpu-hal/src/vulkan/command.rs | 6 +----- wgpu-types/src/lib.rs | 1 - wgpu/src/macros.rs | 2 -- wgpu/src/util/mod.rs | 6 +----- 43 files changed, 30 insertions(+), 74 deletions(-) diff --git a/examples/src/boids/mod.rs b/examples/src/boids/mod.rs index c527be96d9..712712f1bb 100644 --- a/examples/src/boids/mod.rs +++ b/examples/src/boids/mod.rs @@ -2,7 +2,7 @@ // adapted from https://github.com/austinEng/webgpu-samples/blob/master/src/examples/computeBoids.ts use nanorand::{Rng, WyRand}; -use std::{borrow::Cow, mem::size_of}; +use std::borrow::Cow; use wgpu::util::DeviceExt; // number of boid particles to simulate diff --git a/examples/src/cube/mod.rs b/examples/src/cube/mod.rs index 78dc06e061..8a6d9eb58d 100644 --- a/examples/src/cube/mod.rs +++ b/examples/src/cube/mod.rs @@ -1,5 +1,5 @@ use bytemuck::{Pod, Zeroable}; -use std::{borrow::Cow, f32::consts, mem::size_of}; +use std::{borrow::Cow, f32::consts}; use wgpu::util::DeviceExt; #[repr(C)] diff --git a/examples/src/hello_compute/mod.rs b/examples/src/hello_compute/mod.rs index e53f49fa43..6caca2538e 100644 --- a/examples/src/hello_compute/mod.rs +++ b/examples/src/hello_compute/mod.rs @@ -1,4 +1,4 @@ -use std::{borrow::Cow, mem::size_of_val, str::FromStr}; +use std::{borrow::Cow, str::FromStr}; use wgpu::util::DeviceExt; // Indicates a u32 overflow in an intermediate Collatz value diff --git a/examples/src/hello_synchronization/mod.rs b/examples/src/hello_synchronization/mod.rs index fad5d7a9da..d6f36d0784 100644 --- a/examples/src/hello_synchronization/mod.rs +++ b/examples/src/hello_synchronization/mod.rs @@ -1,5 +1,3 @@ -use std::mem::size_of_val; - const ARR_SIZE: usize = 128; struct ExecuteResults { diff --git a/examples/src/hello_workgroups/mod.rs b/examples/src/hello_workgroups/mod.rs index 7a653cf3e8..04a72fb574 100644 --- a/examples/src/hello_workgroups/mod.rs +++ b/examples/src/hello_workgroups/mod.rs @@ -7,8 +7,6 @@ //! //! Only parts specific to this example will be commented. -use std::mem::size_of_val; - use wgpu::util::DeviceExt; async fn run() { diff --git a/examples/src/mipmap/mod.rs b/examples/src/mipmap/mod.rs index 179970ad7f..84f21519b3 100644 --- a/examples/src/mipmap/mod.rs +++ b/examples/src/mipmap/mod.rs @@ -1,5 +1,5 @@ use bytemuck::{Pod, Zeroable}; -use std::{borrow::Cow, f32::consts, mem::size_of}; +use std::{borrow::Cow, f32::consts}; use wgpu::util::DeviceExt; const TEXTURE_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Rgba8UnormSrgb; diff --git a/examples/src/msaa_line/mod.rs b/examples/src/msaa_line/mod.rs index 431fe02bab..cce98c3250 100644 --- a/examples/src/msaa_line/mod.rs +++ b/examples/src/msaa_line/mod.rs @@ -7,7 +7,7 @@ //! * Set the primitive_topology to PrimitiveTopology::LineList. //! * Vertices and Indices describe the two points that make up a line. -use std::{borrow::Cow, iter, mem::size_of}; +use std::{borrow::Cow, iter}; use bytemuck::{Pod, Zeroable}; use wgpu::util::DeviceExt; diff --git a/examples/src/repeated_compute/mod.rs b/examples/src/repeated_compute/mod.rs index 83dcd4099e..bc8748dc31 100644 --- a/examples/src/repeated_compute/mod.rs +++ b/examples/src/repeated_compute/mod.rs @@ -5,8 +5,6 @@ //! hello-compute example does not such as mapping buffers //! and why use the async channels. -use std::mem::size_of_val; - const OVERFLOW: u32 = 0xffffffff; async fn run() { diff --git a/examples/src/shadow/mod.rs b/examples/src/shadow/mod.rs index a7edcce7e8..009a270c61 100644 --- a/examples/src/shadow/mod.rs +++ b/examples/src/shadow/mod.rs @@ -1,4 +1,4 @@ -use std::{borrow::Cow, f32::consts, iter, mem::size_of, ops::Range, sync::Arc}; +use std::{borrow::Cow, f32::consts, iter, ops::Range, sync::Arc}; use bytemuck::{Pod, Zeroable}; use wgpu::util::{align_to, DeviceExt}; diff --git a/examples/src/skybox/mod.rs b/examples/src/skybox/mod.rs index 82e58ef6d5..a5977a0c3c 100644 --- a/examples/src/skybox/mod.rs +++ b/examples/src/skybox/mod.rs @@ -1,5 +1,5 @@ use bytemuck::{Pod, Zeroable}; -use std::{borrow::Cow, f32::consts, mem::size_of}; +use std::{borrow::Cow, f32::consts}; use wgpu::{util::DeviceExt, AstcBlock, AstcChannel}; const IMAGE_SIZE: u32 = 256; diff --git a/examples/src/stencil_triangles/mod.rs b/examples/src/stencil_triangles/mod.rs index bb433af11c..5867a3b907 100644 --- a/examples/src/stencil_triangles/mod.rs +++ b/examples/src/stencil_triangles/mod.rs @@ -1,6 +1,5 @@ use bytemuck::{Pod, Zeroable}; use std::borrow::Cow; -use std::mem::size_of; use wgpu::util::DeviceExt; #[repr(C)] diff --git a/examples/src/storage_texture/mod.rs b/examples/src/storage_texture/mod.rs index a687584196..763a9ee46f 100644 --- a/examples/src/storage_texture/mod.rs +++ b/examples/src/storage_texture/mod.rs @@ -14,8 +14,6 @@ //! A lot of things aren't explained here via comments. See hello-compute and //! repeated-compute for code that is more thoroughly commented. -use std::mem::size_of_val; - #[cfg(not(target_arch = "wasm32"))] use crate::utils::output_image_native; #[cfg(target_arch = "wasm32")] diff --git a/examples/src/texture_arrays/mod.rs b/examples/src/texture_arrays/mod.rs index 8c81950e9a..fae8d42aa1 100644 --- a/examples/src/texture_arrays/mod.rs +++ b/examples/src/texture_arrays/mod.rs @@ -1,8 +1,5 @@ use bytemuck::{Pod, Zeroable}; -use std::{ - mem::size_of, - num::{NonZeroU32, NonZeroU64}, -}; +use std::num::{NonZeroU32, NonZeroU64}; use wgpu::util::DeviceExt; #[repr(C)] diff --git a/examples/src/timestamp_queries/mod.rs b/examples/src/timestamp_queries/mod.rs index 2921ae4c85..2cf06b84a9 100644 --- a/examples/src/timestamp_queries/mod.rs +++ b/examples/src/timestamp_queries/mod.rs @@ -17,8 +17,6 @@ //! The period, i.e. the unit of time, of the timestamps in wgpu is undetermined and needs to be queried with `wgpu::Queue::get_timestamp_period` //! in order to get comparable results. -use std::mem::size_of; - use wgpu::util::DeviceExt; struct Queries { diff --git a/examples/src/uniform_values/mod.rs b/examples/src/uniform_values/mod.rs index 1ef58de09a..58a1da9c57 100644 --- a/examples/src/uniform_values/mod.rs +++ b/examples/src/uniform_values/mod.rs @@ -16,7 +16,7 @@ //! The usage of the uniform buffer within the shader itself is pretty self-explanatory given //! some understanding of WGSL. -use std::{mem::size_of, sync::Arc}; +use std::sync::Arc; // We won't bring StorageBuffer into scope as that might be too easy to confuse // with actual GPU-allocated WGPU storage buffers. use encase::ShaderType; diff --git a/examples/src/water/mod.rs b/examples/src/water/mod.rs index 505f5707e5..69a9317958 100644 --- a/examples/src/water/mod.rs +++ b/examples/src/water/mod.rs @@ -3,7 +3,7 @@ mod point_gen; use bytemuck::{Pod, Zeroable}; use glam::Vec3; use nanorand::{Rng, WyRand}; -use std::{borrow::Cow, f32::consts, iter, mem::size_of}; +use std::{borrow::Cow, f32::consts, iter}; use wgpu::util::DeviceExt; /// diff --git a/naga/src/back/msl/mod.rs b/naga/src/back/msl/mod.rs index 96dd142a50..68ebc90e4e 100644 --- a/naga/src/back/msl/mod.rs +++ b/naga/src/back/msl/mod.rs @@ -669,6 +669,5 @@ pub fn write_string( #[test] fn test_error_size() { - use std::mem::size_of; assert_eq!(size_of::(), 32); } diff --git a/player/tests/test.rs b/player/tests/test.rs index ec96f54469..ece623f58c 100644 --- a/player/tests/test.rs +++ b/player/tests/test.rs @@ -14,7 +14,6 @@ use player::GlobalPlay; use std::{ fs::{read_to_string, File}, io::{Read, Seek, SeekFrom}, - mem::size_of, path::{Path, PathBuf}, slice, }; diff --git a/tests/tests/compute_pass_ownership.rs b/tests/tests/compute_pass_ownership.rs index 6b5bad8cf7..68754f3fbd 100644 --- a/tests/tests/compute_pass_ownership.rs +++ b/tests/tests/compute_pass_ownership.rs @@ -1,7 +1,7 @@ //! Tests that compute passes take ownership of resources that are associated with. //! I.e. once a resource is passed in to a compute pass, it can be dropped. -use std::{mem::size_of, num::NonZeroU64}; +use std::num::NonZeroU64; use wgpu::util::DeviceExt as _; use wgpu_test::{gpu_test, valid, GpuTestConfiguration, TestParameters, TestingContext}; diff --git a/tests/tests/occlusion_query/mod.rs b/tests/tests/occlusion_query/mod.rs index 20c7fff82b..2dffc77d1c 100644 --- a/tests/tests/occlusion_query/mod.rs +++ b/tests/tests/occlusion_query/mod.rs @@ -1,4 +1,4 @@ -use std::{borrow::Cow, mem::size_of}; +use std::borrow::Cow; use wgpu_test::{gpu_test, FailureCase, GpuTestConfiguration, TestParameters}; #[gpu_test] diff --git a/tests/tests/render_pass_ownership.rs b/tests/tests/render_pass_ownership.rs index 5086d38d91..755f25d01e 100644 --- a/tests/tests/render_pass_ownership.rs +++ b/tests/tests/render_pass_ownership.rs @@ -9,7 +9,7 @@ //! * rpass.multi_draw_indirect_count //! * rpass.multi_draw_indexed_indirect_count //! -use std::{mem::size_of, num::NonZeroU64}; +use std::num::NonZeroU64; use wgpu::util::DeviceExt as _; use wgpu_test::{gpu_test, valid, GpuTestConfiguration, TestParameters, TestingContext}; diff --git a/tests/tests/subgroup_operations/mod.rs b/tests/tests/subgroup_operations/mod.rs index ecf8adfd7d..68f2ca73bd 100644 --- a/tests/tests/subgroup_operations/mod.rs +++ b/tests/tests/subgroup_operations/mod.rs @@ -1,4 +1,4 @@ -use std::{borrow::Cow, mem::size_of, num::NonZeroU64}; +use std::{borrow::Cow, num::NonZeroU64}; use wgpu_test::{gpu_test, GpuTestConfiguration, TestParameters}; diff --git a/tests/tests/vertex_formats/mod.rs b/tests/tests/vertex_formats/mod.rs index d447ac8f7e..0b6ec2f9ca 100644 --- a/tests/tests/vertex_formats/mod.rs +++ b/tests/tests/vertex_formats/mod.rs @@ -1,6 +1,6 @@ //! Tests that vertex formats pass through to vertex shaders accurately. -use std::{mem::size_of_val, num::NonZeroU64}; +use std::num::NonZeroU64; use wgpu::util::{BufferInitDescriptor, DeviceExt}; diff --git a/tests/tests/vertex_indices/mod.rs b/tests/tests/vertex_indices/mod.rs index 5c5ce8a202..5428490185 100644 --- a/tests/tests/vertex_indices/mod.rs +++ b/tests/tests/vertex_indices/mod.rs @@ -3,7 +3,7 @@ //! We need tests for these as the backends use various schemes to work around the lack //! of support for things like `gl_BaseInstance` in shaders. -use std::{mem::size_of_val, num::NonZeroU64, ops::Range}; +use std::{num::NonZeroU64, ops::Range}; use itertools::Itertools; use strum::IntoEnumIterator; diff --git a/wgpu-core/src/command/bundle.rs b/wgpu-core/src/command/bundle.rs index 394858f9fd..eb202f0686 100644 --- a/wgpu-core/src/command/bundle.rs +++ b/wgpu-core/src/command/bundle.rs @@ -103,7 +103,7 @@ use crate::{ }; use arrayvec::ArrayVec; -use std::{borrow::Cow, mem::size_of, num::NonZeroU32, ops::Range, sync::Arc}; +use std::{borrow::Cow, num::NonZeroU32, ops::Range, sync::Arc}; use thiserror::Error; use super::{ diff --git a/wgpu-core/src/command/compute.rs b/wgpu-core/src/command/compute.rs index 5de03917d2..d78cfd24a8 100644 --- a/wgpu-core/src/command/compute.rs +++ b/wgpu-core/src/command/compute.rs @@ -29,7 +29,7 @@ use thiserror::Error; use wgt::{BufferAddress, DynamicOffset}; use std::sync::Arc; -use std::{fmt, mem::size_of, str}; +use std::{fmt, str}; use super::{bind::BinderError, memory_init::CommandBufferTextureMemoryActions}; diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index b6680333c2..df3179a3de 100644 --- a/wgpu-core/src/command/render.rs +++ b/wgpu-core/src/command/render.rs @@ -46,7 +46,7 @@ use serde::Deserialize; use serde::Serialize; use std::sync::Arc; -use std::{borrow::Cow, fmt, iter, mem::size_of, num::NonZeroU32, ops::Range, str}; +use std::{borrow::Cow, fmt, iter, num::NonZeroU32, ops::Range, str}; use super::render_command::ArcRenderCommand; use super::{ diff --git a/wgpu-core/src/id.rs b/wgpu-core/src/id.rs index 4e4897c832..5e723ea7d3 100644 --- a/wgpu-core/src/id.rs +++ b/wgpu-core/src/id.rs @@ -4,7 +4,6 @@ use std::{ fmt::{self, Debug}, hash::Hash, marker::PhantomData, - mem::size_of, num::NonZeroU64, }; use wgt::WasmNotSendSync; diff --git a/wgpu-core/src/pipeline_cache.rs b/wgpu-core/src/pipeline_cache.rs index e506d2cd5b..057223fb57 100644 --- a/wgpu-core/src/pipeline_cache.rs +++ b/wgpu-core/src/pipeline_cache.rs @@ -1,5 +1,3 @@ -use std::mem::size_of; - use thiserror::Error; use wgt::AdapterInfo; diff --git a/wgpu-core/src/registry.rs b/wgpu-core/src/registry.rs index b3349235e9..aded1a3c72 100644 --- a/wgpu-core/src/registry.rs +++ b/wgpu-core/src/registry.rs @@ -1,4 +1,4 @@ -use std::{mem::size_of, sync::Arc}; +use std::sync::Arc; use crate::{ id::Id, diff --git a/wgpu-hal/examples/halmark/main.rs b/wgpu-hal/examples/halmark/main.rs index 8ab7f1cb47..8f92f8137b 100644 --- a/wgpu-hal/examples/halmark/main.rs +++ b/wgpu-hal/examples/halmark/main.rs @@ -14,9 +14,7 @@ use winit::{ use std::{ borrow::{Borrow, Cow}, - iter, - mem::size_of, - ptr, + iter, ptr, time::Instant, }; diff --git a/wgpu-hal/examples/ray-traced-triangle/main.rs b/wgpu-hal/examples/ray-traced-triangle/main.rs index dd91843734..150870f235 100644 --- a/wgpu-hal/examples/ray-traced-triangle/main.rs +++ b/wgpu-hal/examples/ray-traced-triangle/main.rs @@ -8,9 +8,7 @@ use raw_window_handle::{HasDisplayHandle, HasWindowHandle}; use glam::{Affine3A, Mat4, Vec3}; use std::{ borrow::{Borrow, Cow}, - iter, - mem::size_of, - ptr, + iter, ptr, time::Instant, }; use winit::window::WindowButtons; diff --git a/wgpu-hal/src/dx12/adapter.rs b/wgpu-hal/src/dx12/adapter.rs index 45d69f5584..d464ce91a2 100644 --- a/wgpu-hal/src/dx12/adapter.rs +++ b/wgpu-hal/src/dx12/adapter.rs @@ -1,9 +1,4 @@ -use std::{ - mem::{size_of, size_of_val}, - ptr, - sync::Arc, - thread, -}; +use std::{ptr, sync::Arc, thread}; use parking_lot::Mutex; use windows::{ diff --git a/wgpu-hal/src/dx12/device.rs b/wgpu-hal/src/dx12/device.rs index 43425bb5f1..284b2af500 100644 --- a/wgpu-hal/src/dx12/device.rs +++ b/wgpu-hal/src/dx12/device.rs @@ -1,6 +1,5 @@ use std::{ - ffi, - mem::{self, size_of}, + ffi, mem, num::NonZeroU32, ptr, sync::Arc, diff --git a/wgpu-hal/src/dx12/instance.rs b/wgpu-hal/src/dx12/instance.rs index 31d0511d39..9d25c2f3f6 100644 --- a/wgpu-hal/src/dx12/instance.rs +++ b/wgpu-hal/src/dx12/instance.rs @@ -1,4 +1,4 @@ -use std::{mem::size_of_val, sync::Arc}; +use std::sync::Arc; use parking_lot::RwLock; use windows::{ diff --git a/wgpu-hal/src/gles/command.rs b/wgpu-hal/src/gles/command.rs index 2df3c1a991..7d8ce41375 100644 --- a/wgpu-hal/src/gles/command.rs +++ b/wgpu-hal/src/gles/command.rs @@ -1,9 +1,6 @@ use super::{conv, Command as C}; use arrayvec::ArrayVec; -use std::{ - mem::{self, size_of, size_of_val}, - ops::Range, -}; +use std::{mem, ops::Range}; #[derive(Clone, Copy, Debug, Default)] struct TextureSlotDesc { diff --git a/wgpu-hal/src/gles/queue.rs b/wgpu-hal/src/gles/queue.rs index 39315f72b7..6ea3bd0b87 100644 --- a/wgpu-hal/src/gles/queue.rs +++ b/wgpu-hal/src/gles/queue.rs @@ -2,7 +2,6 @@ use super::{conv::is_layered_target, Command as C, PrivateCapabilities}; use arrayvec::ArrayVec; use glow::HasContext; use std::{ - mem::size_of, slice, sync::{atomic::Ordering, Arc}, }; diff --git a/wgpu-hal/src/gles/wgl.rs b/wgpu-hal/src/gles/wgl.rs index 2d6c91aee0..dfb7bf25db 100644 --- a/wgpu-hal/src/gles/wgl.rs +++ b/wgpu-hal/src/gles/wgl.rs @@ -1,7 +1,7 @@ use std::{ collections::HashSet, ffi::{c_void, CStr, CString}, - mem::{self, size_of, size_of_val, ManuallyDrop}, + mem::{self, ManuallyDrop}, os::raw::c_int, ptr, sync::{ diff --git a/wgpu-hal/src/metal/command.rs b/wgpu-hal/src/metal/command.rs index 069013570f..98c395b870 100644 --- a/wgpu-hal/src/metal/command.rs +++ b/wgpu-hal/src/metal/command.rs @@ -1,6 +1,6 @@ use super::{conv, AsNative, TimestampQuerySupport}; use crate::CommandEncoder as _; -use std::{borrow::Cow, mem::size_of, ops::Range}; +use std::{borrow::Cow, ops::Range}; // has to match `Temp::binding_sizes` const WORD_SIZE: usize = 4; diff --git a/wgpu-hal/src/vulkan/command.rs b/wgpu-hal/src/vulkan/command.rs index 6b02e35f4e..5759ad53b0 100644 --- a/wgpu-hal/src/vulkan/command.rs +++ b/wgpu-hal/src/vulkan/command.rs @@ -3,11 +3,7 @@ use super::conv; use arrayvec::ArrayVec; use ash::vk; -use std::{ - mem::{self, size_of}, - ops::Range, - slice, -}; +use std::{mem, ops::Range, slice}; const ALLOCATION_GRANULARITY: u32 = 16; const DST_IMAGE_LAYOUT: vk::ImageLayout = vk::ImageLayout::TRANSFER_DST_OPTIMAL; diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index ebb9da98a9..d5c68d7597 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -18,7 +18,6 @@ use serde::Deserialize; #[cfg(any(feature = "serde", test))] use serde::Serialize; use std::hash::{Hash, Hasher}; -use std::mem::size_of; use std::path::PathBuf; use std::{num::NonZeroU32, ops::Range}; diff --git a/wgpu/src/macros.rs b/wgpu/src/macros.rs index db9548d90c..4acbb30e89 100644 --- a/wgpu/src/macros.rs +++ b/wgpu/src/macros.rs @@ -32,8 +32,6 @@ macro_rules! vertex_attr_array { #[test] fn test_vertex_attr_array() { - use std::mem::size_of; - let attrs = vertex_attr_array![0 => Float32x2, 3 => Uint16x4]; // VertexAttribute does not support PartialEq, so we cannot test directly assert_eq!(attrs.len(), 2); diff --git a/wgpu/src/util/mod.rs b/wgpu/src/util/mod.rs index 11148179b4..339b08dddc 100644 --- a/wgpu/src/util/mod.rs +++ b/wgpu/src/util/mod.rs @@ -9,11 +9,7 @@ mod encoder; mod init; use std::sync::Arc; -use std::{ - borrow::Cow, - mem::{align_of, size_of}, - ptr::copy_nonoverlapping, -}; +use std::{borrow::Cow, ptr::copy_nonoverlapping}; pub use belt::StagingBelt; pub use device::{BufferInitDescriptor, DeviceExt, TextureDataOrder};