Skip to content

Commit 1851bde

Browse files
committed
Migrate to Rust 2024
1 parent 711a2c3 commit 1851bde

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

tests/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tests"
3-
edition = "2021"
3+
edition = "2024"
44
version.workspace = true
55
authors.workspace = true
66
license.workspace = true

tests/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ enum Arch {
2121
#[ctor::ctor]
2222
fn init() {
2323
if std::env::var("RUST_LOG").is_err() {
24-
std::env::set_var("RUST_LOG", "warn");
24+
unsafe { std::env::set_var("RUST_LOG", "warn"); }
2525
}
2626
env_logger::init();
2727
}

towboot/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version.workspace = true
66
authors.workspace = true
77
license.workspace = true
88
repository.workspace = true
9-
edition = "2021"
9+
edition = "2024"
1010
default-target = "i686-unknown-uefi"
1111

1212
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

towboot/src/mem.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl Allocation {
140140
assert!(filter.next().is_none()); // there shouldn't be another matching entry
141141
}
142142
let dest: usize = a.try_into().unwrap();
143-
core::ptr::copy(self.ptr.as_ptr(), dest as *mut u8, self.len);
143+
unsafe { core::ptr::copy(self.ptr.as_ptr(), dest as *mut u8, self.len); }
144144
self.ptr = NonNull::new(a as *mut u8).unwrap();
145145
self.should_be_at = None;
146146
}

towboot_config/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version.workspace = true
44
authors.workspace = true
55
license.workspace = true
66
repository.workspace = true
7-
edition = "2021"
7+
edition = "2024"
88

99
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1010

towboot_ia32/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version.workspace = true
44
authors.workspace = true
55
license.workspace = true
66
repository.workspace = true
7-
edition = "2021"
7+
edition = "2024"
88

99
[dependencies]
1010
towboot = { path = "../towboot", artifact = "bin", target = "i686-unknown-uefi" }

towboot_x64/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version.workspace = true
44
authors.workspace = true
55
license.workspace = true
66
repository.workspace = true
7-
edition = "2021"
7+
edition = "2024"
88

99
[dependencies]
1010
towboot = { path = "../towboot", artifact = "bin", target = "x86_64-unknown-uefi" }

towbootctl/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version.workspace = true
44
authors.workspace = true
55
license.workspace = true
66
repository.workspace = true
7-
edition = "2021"
7+
edition = "2024"
88

99
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1010

towbootctl/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ impl VersionCommand {
179179
/// This gets started from the command line.
180180
fn main() -> Result<(), Box<dyn Error>> {
181181
if env::var("RUST_LOG").is_err() {
182-
env::set_var("RUST_LOG", "info");
182+
unsafe { env::set_var("RUST_LOG", "info"); }
183183
}
184184
env_logger::init();
185185
let args: Cli = from_env();

xtask/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version.workspace = true
44
authors.workspace = true
55
license.workspace = true
66
repository.workspace = true
7-
edition = "2021"
7+
edition = "2024"
88

99
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1010

xtask/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl Build {
9090
/// This gets started from the command line.
9191
fn main() -> Result<(), Box<dyn Error>> {
9292
if env::var("RUST_LOG").is_err() {
93-
env::set_var("RUST_LOG", "info");
93+
unsafe { env::set_var("RUST_LOG", "info"); }
9494
}
9595
env_logger::init();
9696
let args: Cli = from_env();

0 commit comments

Comments
 (0)