Bump REPO_MSRV to 1.88 (#7960)

This commit is contained in:
Connor Fitzgerald
2025-07-17 13:00:40 -04:00
committed by GitHub
parent 33b9f86cc4
commit ff0de91ad7
115 changed files with 314 additions and 397 deletions

View File

@@ -193,7 +193,7 @@ fn create_storage_buffers(device: &wgpu::Device, numbers: &[f32]) -> Vec<wgpu::B
.enumerate()
.map(|(e, seg)| {
device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
label: Some(&format!("Storage Buffer-{}", e)),
label: Some(&format!("Storage Buffer-{e}")),
contents: bytemuck::cast_slice(seg),
usage: wgpu::BufferUsages::STORAGE
| wgpu::BufferUsages::COPY_DST
@@ -211,7 +211,7 @@ fn create_staging_buffers(device: &wgpu::Device, numbers: &[f32]) -> Vec<wgpu::B
let size = std::mem::size_of_val(chunks[e]) as u64;
device.create_buffer(&wgpu::BufferDescriptor {
label: Some(&format!("staging buffer-{}", e)),
label: Some(&format!("staging buffer-{e}")),
size,
usage: wgpu::BufferUsages::MAP_READ | wgpu::BufferUsages::COPY_DST,
mapped_at_creation: false,

View File

@@ -328,7 +328,7 @@ impl FrameCounter {
let elapsed_ms = elapsed_secs * 1000.0;
let frame_time = elapsed_ms / self.frame_count as f32;
let fps = self.frame_count as f32 / elapsed_secs;
log::info!("Frame time {:.2}ms ({:.1} FPS)", frame_time, fps);
log::info!("Frame time {frame_time:.2}ms ({fps:.1} FPS)");
self.last_printed_instant = new_instant;
self.frame_count = 0;

View File

@@ -28,13 +28,13 @@ async fn run() {
} = execute(&device, &queue, ARR_SIZE).await;
// Print data
log::info!("Patient results: {:?}", patient_workgroup_results);
log::info!("Patient results: {patient_workgroup_results:?}");
if !patient_workgroup_results.iter().any(|e| *e != 16) {
log::info!("patient_main was patient.");
} else {
log::error!("patient_main was not patient!");
}
log::info!("Hasty results: {:?}", hasty_workgroup_results);
log::info!("Hasty results: {hasty_workgroup_results:?}");
if hasty_workgroup_results.iter().any(|e| *e != 16) {
log::info!("hasty_main was not patient.");
} else {

View File

@@ -47,7 +47,7 @@ impl Example {
vertex_buffer: &wgpu::Buffer,
vertex_count: u32,
) -> wgpu::RenderBundle {
log::info!("sample_count: {}", sample_count);
log::info!("sample_count: {sample_count}");
let pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
label: None,
layout: Some(pipeline_layout),

View File

@@ -114,7 +114,7 @@ impl<F: Future<Output = Option<wgpu::Error>>> Future for ErrorFuture<F> {
let inner = unsafe { self.map_unchecked_mut(|me| &mut me.inner) };
inner.poll(cx).map(|error| {
if let Some(e) = error {
panic!("Rendering {}", e);
panic!("Rendering {e}");
}
})
}

View File

@@ -89,7 +89,7 @@ impl<F: Future<Output = Option<wgpu::Error>>> Future for ErrorFuture<F> {
let inner = unsafe { self.map_unchecked_mut(|me| &mut me.inner) };
inner.poll(cx).map(|error| {
if let Some(e) = error {
panic!("Rendering {}", e);
panic!("Rendering {e}");
}
})
}

View File

@@ -113,7 +113,7 @@ impl<F: Future<Output = Option<wgpu::Error>>> Future for ErrorFuture<F> {
let inner = unsafe { self.map_unchecked_mut(|me| &mut me.inner) };
inner.poll(cx).map(|error| {
if let Some(e) = error {
panic!("Rendering {}", e);
panic!("Rendering {e}");
}
})
}

View File

@@ -41,7 +41,7 @@ impl<F: Future<Output = Option<wgpu::Error>>> Future for ErrorFuture<F> {
let inner = unsafe { self.map_unchecked_mut(|me| &mut me.inner) };
inner.poll(cx).map(|error| {
if let Some(e) = error {
panic!("Rendering {}", e);
panic!("Rendering {e}");
}
})
}
@@ -93,7 +93,7 @@ struct Material {
fn load_model(scene: &mut RawSceneComponents, path: &str) {
let path = env!("CARGO_MANIFEST_DIR").to_string() + "/src" + path;
println!("{}", path);
println!("{path}");
let mut object = obj::Obj::load(path).unwrap();
object.load_mtls().unwrap();

View File

@@ -68,7 +68,7 @@ impl<F: Future<Output = Option<wgpu::Error>>> Future for ErrorFuture<F> {
let inner = unsafe { self.map_unchecked_mut(|me| &mut me.inner) };
inner.poll(cx).map(|error| {
if let Some(e) = error {
panic!("Rendering {}", e);
panic!("Rendering {e}");
}
})
}

View File

@@ -299,11 +299,7 @@ impl crate::framework::Example for Example {
let max_mips = layer_size.max_mips(wgpu::TextureDimension::D2);
log::debug!(
"Copying {:?} skybox images of size {}, {}, 6 with {} mips to gpu",
skybox_format,
IMAGE_SIZE,
IMAGE_SIZE,
max_mips,
"Copying {skybox_format:?} skybox images of size {IMAGE_SIZE}, {IMAGE_SIZE}, 6 with {max_mips} mips to gpu",
);
let bytes = match skybox_format {

View File

@@ -37,7 +37,7 @@ pub fn output_image_native(image_data: Vec<u8>, texture_dims: (usize, usize), pa
let mut file = std::fs::File::create(&path).unwrap();
file.write_all(&png_data[..]).unwrap();
log::info!("PNG file written to disc as \"{}\".", path);
log::info!("PNG file written to disc as \"{path}\".");
}
/// Effectively a version of `output_image_native` but meant for web browser contexts.
@@ -58,9 +58,8 @@ pub fn output_image_wasm(image_data: Vec<u8>, texture_dims: (usize, usize)) {
Err(e) => {
log::error!(
"In searching for a staging canvas for outputting an image \
(element with id \"staging-canvas\"), found non-canvas element: {:?}.
Replacing with standard staging canvas.",
e
(element with id \"staging-canvas\"), found non-canvas element: {e:?}.
Replacing with standard staging canvas."
);
e.remove();
create_staging_canvas(&document)
@@ -101,9 +100,8 @@ pub fn output_image_wasm(image_data: Vec<u8>, texture_dims: (usize, usize)) {
Ok(e) => e,
Err(e) => {
log::error!(
"Found an element with the id \"output-image-target\" but it was not an image: {:?}.
"Found an element with the id \"output-image-target\" but it was not an image: {e:?}.
Replacing with default image output element.",
e
);
e.remove();
create_output_image_element(&document)

View File

@@ -1,7 +1,7 @@
[package]
name = "wgpu-example-01-hello-compute"
edition = "2021"
rust-version = "1.84"
rust-version = "1.88"
publish = false
[dependencies]

View File

@@ -249,5 +249,5 @@ fn main() {
let result: &[f32] = bytemuck::cast_slice(&data);
// Print out the result.
println!("Result: {:?}", result);
println!("Result: {result:?}");
}

View File

@@ -1,7 +1,7 @@
[package]
name = "wgpu-example-02-hello-window"
edition = "2021"
rust-version = "1.84"
rust-version = "1.88"
publish = false
[dependencies]

View File

@@ -1,7 +1,7 @@
[package]
name = "wgpu-example-custom-backend"
edition = "2021"
rust-version = "1.84"
rust-version = "1.88"
publish = false
[features]