Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "system76_firmware_setup"
version = "1.0.0"
edition = "2021"
edition = "2024"
license = "GPL-3.0-only"

[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "nightly-2024-05-11"
channel = "1.85.0"
targets = ["x86_64-unknown-uefi"]
profile = "minimal"
8 changes: 4 additions & 4 deletions src/fde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ impl<T> ListEntry<T> {

unsafe fn object_at(&self, offset: usize) -> &T {
let addr = self as *const Self as usize;
&*((addr - offset) as *const T)
unsafe { &*((addr - offset) as *const T) }
}

unsafe fn object_at_mut(&mut self, offset: usize) -> &mut T {
let addr = self as *mut Self as usize;
&mut *((addr - offset) as *mut T)
unsafe { &mut *((addr - offset) as *mut T) }
}
}

Expand All @@ -140,11 +140,11 @@ macro_rules! list_entry {
($t:ident, $l:tt) => {
impl ListEntryObject<$t> for ListEntry<$t> {
unsafe fn object(&self) -> &$t {
self.object_at(offset_of!($t, $l))
unsafe { self.object_at(offset_of!($t, $l)) }
}

unsafe fn object_mut(&mut self) -> &mut $t {
self.object_at_mut(offset_of!($t, $l))
unsafe { self.object_at_mut(offset_of!($t, $l)) }
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mod rng;
mod security;
mod ui;

#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn main() -> Status {
let uefi = std::system_table();

Expand Down