From d4359d74946b9908c58eab9e70db061b2b8c8343 Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Fri, 21 Aug 2026 23:38:36 -0400 Subject: [PATCH] Use edition 2024 in standalone examples (#10139) --- examples/standalone/01_hello_compute/Cargo.toml | 2 +- examples/standalone/02_hello_window/Cargo.toml | 2 +- examples/standalone/03_hdr_surface/Cargo.toml | 2 +- examples/standalone/03_hdr_surface/src/main.rs | 4 +++- examples/standalone/custom_backend/Cargo.toml | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/standalone/01_hello_compute/Cargo.toml b/examples/standalone/01_hello_compute/Cargo.toml index c6a05aab7..04a98e78a 100644 --- a/examples/standalone/01_hello_compute/Cargo.toml +++ b/examples/standalone/01_hello_compute/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wgpu-example-01-hello-compute" -edition = "2021" +edition = "2024" rust-version = "1.87" publish = false diff --git a/examples/standalone/02_hello_window/Cargo.toml b/examples/standalone/02_hello_window/Cargo.toml index 50bfe5c80..48ac4b366 100644 --- a/examples/standalone/02_hello_window/Cargo.toml +++ b/examples/standalone/02_hello_window/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wgpu-example-02-hello-window" -edition = "2021" +edition = "2024" rust-version = "1.87" publish = false diff --git a/examples/standalone/03_hdr_surface/Cargo.toml b/examples/standalone/03_hdr_surface/Cargo.toml index ced0e031c..bd071d752 100644 --- a/examples/standalone/03_hdr_surface/Cargo.toml +++ b/examples/standalone/03_hdr_surface/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wgpu-example-03-hdr-surface" -edition = "2021" +edition = "2024" rust-version = "1.87" publish = false diff --git a/examples/standalone/03_hdr_surface/src/main.rs b/examples/standalone/03_hdr_surface/src/main.rs index 79adb9c46..13deba854 100644 --- a/examples/standalone/03_hdr_surface/src/main.rs +++ b/examples/standalone/03_hdr_surface/src/main.rs @@ -162,7 +162,9 @@ fn pick_mode(caps: &wgpu::SurfaceCapabilities, forced: Option<&str>) -> ModeChoi Some("extended-display-p3") => cs == Cs::ExtendedDisplayP3, Some("srgb") => false, Some(other) => { - panic!("unknown mode {other:?} (use hdr10|hlg|scrgb|extended-srgb|extended-display-p3|srgb)") + panic!( + "unknown mode {other:?} (use hdr10|hlg|scrgb|extended-srgb|extended-display-p3|srgb)" + ) } }; diff --git a/examples/standalone/custom_backend/Cargo.toml b/examples/standalone/custom_backend/Cargo.toml index a54c2710b..24064eb54 100644 --- a/examples/standalone/custom_backend/Cargo.toml +++ b/examples/standalone/custom_backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wgpu-example-custom-backend" -edition = "2021" +edition = "2024" rust-version = "1.87" publish = false