Skip to content

Commit 023a41c

Browse files
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](rust-lang/rust#123168).
1 parent b92480d commit 023a41c

File tree

43 files changed

+30
-74
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+30
-74
lines changed

examples/src/boids/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// adapted from https://github.com/austinEng/webgpu-samples/blob/master/src/examples/computeBoids.ts
33

44
use nanorand::{Rng, WyRand};
5-
use std::{borrow::Cow, mem::size_of};
5+
use std::borrow::Cow;
66
use wgpu::util::DeviceExt;
77

88
// number of boid particles to simulate

examples/src/cube/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use bytemuck::{Pod, Zeroable};
2-
use std::{borrow::Cow, f32::consts, mem::size_of};
2+
use std::{borrow::Cow, f32::consts};
33
use wgpu::util::DeviceExt;
44

55
#[repr(C)]

examples/src/hello_compute/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{borrow::Cow, mem::size_of_val, str::FromStr};
1+
use std::{borrow::Cow, str::FromStr};
22
use wgpu::util::DeviceExt;
33

44
// Indicates a u32 overflow in an intermediate Collatz value

examples/src/hello_synchronization/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::mem::size_of_val;
2-
31
const ARR_SIZE: usize = 128;
42

53
struct ExecuteResults {

examples/src/hello_workgroups/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//!
88
//! Only parts specific to this example will be commented.
99
10-
use std::mem::size_of_val;
11-
1210
use wgpu::util::DeviceExt;
1311

1412
async fn run() {

examples/src/mipmap/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use bytemuck::{Pod, Zeroable};
2-
use std::{borrow::Cow, f32::consts, mem::size_of};
2+
use std::{borrow::Cow, f32::consts};
33
use wgpu::util::DeviceExt;
44

55
const TEXTURE_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Rgba8UnormSrgb;

examples/src/msaa_line/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! * Set the primitive_topology to PrimitiveTopology::LineList.
88
//! * Vertices and Indices describe the two points that make up a line.
99
10-
use std::{borrow::Cow, iter, mem::size_of};
10+
use std::{borrow::Cow, iter};
1111

1212
use bytemuck::{Pod, Zeroable};
1313
use wgpu::util::DeviceExt;

examples/src/repeated_compute/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
//! hello-compute example does not such as mapping buffers
66
//! and why use the async channels.
77
8-
use std::mem::size_of_val;
9-
108
const OVERFLOW: u32 = 0xffffffff;
119

1210
async fn run() {

examples/src/shadow/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{borrow::Cow, f32::consts, iter, mem::size_of, ops::Range, sync::Arc};
1+
use std::{borrow::Cow, f32::consts, iter, ops::Range, sync::Arc};
22

33
use bytemuck::{Pod, Zeroable};
44
use wgpu::util::{align_to, DeviceExt};

examples/src/skybox/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use bytemuck::{Pod, Zeroable};
2-
use std::{borrow::Cow, f32::consts, mem::size_of};
2+
use std::{borrow::Cow, f32::consts};
33
use wgpu::{util::DeviceExt, AstcBlock, AstcChannel};
44

55
const IMAGE_SIZE: u32 = 256;

0 commit comments

Comments
 (0)