Skip to content

Commit f152b00

Browse files
committed
cargo-gpu merge: upgrade cargo-gpu to edition 2024
1 parent 3d28c03 commit f152b00

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

crates/cargo-gpu-install/src/install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Install a dedicated per-shader crate that has the `rust-gpu` compiler in it.
22
33
use crate::spirv_source::{
4-
get_channel_from_rustc_codegen_spirv_build_script, query_metadata, FindPackage as _,
4+
FindPackage as _, get_channel_from_rustc_codegen_spirv_build_script, query_metadata,
55
};
66
use crate::{cache_dir, spirv_source::SpirvSource};
77
use anyhow::Context as _;

crates/cargo-gpu/src/dump_usage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Convenience function for internal use. Dumps all the CLI usage instructions. Useful for
22
//! updating the README.
33
4-
use crate::{user_output, Cli};
4+
use crate::{Cli, user_output};
55

66
/// main dump usage function
77
pub fn dump_full_usage_for_readme() -> anyhow::Result<()> {

crates/cargo-gpu/src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ use cargo_gpu::Cli;
33
use clap::Parser as _;
44

55
fn main() {
6+
// Safety: always in single-threaded code
67
#[cfg(debug_assertions)]
7-
std::env::set_var("RUST_BACKTRACE", "1");
8+
unsafe {
9+
std::env::set_var("RUST_BACKTRACE", "1");
10+
}
811

912
env_logger::builder().init();
1013

crates/xtask/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "xtask"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55

66
[dependencies]
77
anyhow.workspace = true

crates/xtask/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ impl DependencyVersion {
244244
pub fn modify_toml(&self, toml: &mut toml::Value) {
245245
if let Some(mut table) = self.to_toml() {
246246
let mut copy = |key: &str| {
247-
if let Some(src_table) = toml.as_table_mut() {
248-
if let Some(value) = src_table.remove(key) {
249-
table.insert(key.to_owned(), value);
250-
}
247+
if let Some(src_table) = toml.as_table_mut()
248+
&& let Some(value) = src_table.remove(key)
249+
{
250+
table.insert(key.to_owned(), value);
251251
}
252252
};
253253
copy("default-features");

0 commit comments

Comments
 (0)