rust edition 2024

This commit is contained in:
2025-07-02 00:53:55 +02:00
parent f6ebf675bc
commit 73c6966fe3
8 changed files with 10 additions and 11 deletions

2
Cargo.lock generated
View File

@ -4,7 +4,7 @@ version = 4
[[package]] [[package]]
name = "barnacle" name = "barnacle"
version = "1.0.0" version = "1.0.1"
dependencies = [ dependencies = [
"uefi", "uefi",
] ]

View File

@ -1,7 +1,7 @@
[package] [package]
name = "barnacle" name = "barnacle"
version = "1.0.0" version = "1.0.1"
edition = "2021" edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,9 +1,8 @@
use core::{ffi::c_void, mem::MaybeUninit}; use core::{ffi::c_void, mem::MaybeUninit};
use uefi::{ use uefi::{
boot, Guid, Identify, Status, boot,
proto::device_path::{build, DevicePath}, proto::device_path::{DevicePath, build},
Guid, Identify, Status,
}; };
const LOADFILE2_GUID: Guid = Guid::parse_or_panic("4006c0c1-fcb3-403e-996d-4a6c8724e06d"); const LOADFILE2_GUID: Guid = Guid::parse_or_panic("4006c0c1-fcb3-403e-996d-4a6c8724e06d");

View File

@ -2,7 +2,7 @@
use linux::start_linux; use linux::start_linux;
use pe::get_loader_sections; use pe::get_loader_sections;
use uefi::{boot, Handle, Status}; use uefi::{Handle, Status, boot};
mod initrd; mod initrd;
mod linux; mod linux;

View File

@ -1,6 +1,6 @@
use core::{ffi::c_void, mem::MaybeUninit, ptr::slice_from_raw_parts}; use core::{ffi::c_void, mem::MaybeUninit, ptr::slice_from_raw_parts};
use uefi::{boot, proto::loaded_image::LoadedImage, Handle, Result}; use uefi::{Handle, Result, boot, proto::loaded_image::LoadedImage};
use crate::{ use crate::{
initrd::{install_initrd, make_loader}, initrd::{install_initrd, make_loader},

View File

@ -3,9 +3,9 @@
use barnacle::bootloader; use barnacle::bootloader;
use uefi::Status;
use uefi::boot; use uefi::boot;
use uefi::prelude::entry; use uefi::prelude::entry;
use uefi::Status;
#[entry] #[entry]
fn main() -> Status { fn main() -> Status {

View File

@ -1,5 +1,5 @@
use uefi::proto::loaded_image::LoadedImage; use uefi::proto::loaded_image::LoadedImage;
use uefi::{boot, Error, Handle, Result, Status}; use uefi::{Error, Handle, Result, Status, boot};
const LINUX_SNAME: [u8; 8] = *b".linux\0\0"; const LINUX_SNAME: [u8; 8] = *b".linux\0\0";
const CMDLINE_SNAME: [u8; 8] = *b".cmdline"; const CMDLINE_SNAME: [u8; 8] = *b".cmdline";

View File

@ -1,6 +1,6 @@
use core::ffi::c_void; use core::ffi::c_void;
use uefi::{boot, proto::unsafe_protocol, Result}; use uefi::{Result, boot, proto::unsafe_protocol};
#[unsafe_protocol("A46423E3-4617-49F1-B9FF-D1BFA9115839")] #[unsafe_protocol("A46423E3-4617-49F1-B9FF-D1BFA9115839")]
struct SecurityArch { struct SecurityArch {