Skip to content

Commit 1cc3189

Browse files
uefi: Add panic doc to uefi::helpers::init
This function may panic if called more than once, because `log::set_logger` panics if called more than once. Document this panic.
1 parent f7ffd27 commit 1cc3189

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

uefi/src/helpers/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ pub fn system_table() -> SystemTable<Boot> {
5555
/// **PLEASE NOTE** that these helpers are meant for the pre exit boot service
5656
/// epoch. Limited functionality might work after exiting them, such as logging
5757
/// to the debugcon device.
58+
///
59+
/// # Panics
60+
///
61+
/// This function may panic if called more than once.
5862
#[allow(clippy::missing_const_for_fn)]
5963
pub fn init() -> Result<()> {
6064
// Set up logging.

0 commit comments

Comments
 (0)