Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 58a623a

Browse files
Don't ask for aborting panics, make sure they're used
1 parent efacc77 commit 58a623a

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

‎Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@ members = [
1919
"uefi-services",
2020
"uefi-exts",
2121
]
22+
23+
[profile.debug]
24+
panic = "abort"
25+
26+
[profile.release]
27+
panic = "abort"

‎src/table/boot.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,6 @@ impl BootServices {
227227
/// priority level. If the event type has flag NotifyWait, the notification
228228
/// will be delivered next time `wait_for_event` or `check_event` is called.
229229
/// In both cases, a `notify_fn` callback must be specified.
230-
///
231-
/// Note that the safety of this function relies on aborting panics being
232-
/// used, as requested by the uefi-rs documentation.
233230
pub fn create_event(
234231
&self,
235232
event_ty: EventType,
@@ -242,7 +239,7 @@ impl BootServices {
242239
// Use a trampoline to handle the impedance mismatch between Rust & C
243240
unsafe extern "win64" fn notify_trampoline(e: Event, ctx: *mut c_void) {
244241
let notify_fn: fn(Event) = core::mem::transmute(ctx);
245-
notify_fn(e); // Aborting panics are assumed here
242+
notify_fn(e); // SAFETY: Aborting panics are assumed here
246243
}
247244
let (notify_func, notify_ctx) = notify_fn
248245
.map(|notify_fn| {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /