Skip to content

Commit

Permalink
fix assert and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
magravel authored and makubacki committed Jun 17, 2024
1 parent 0c043df commit e7fbc3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AdvLoggerPkg/Crates/RustAdvancedLoggerDxe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl AdvancedLogger {

// initialize the AdvancedLogger by acquiring a pointer to the AdvancedLogger protocol.
fn init(&self, bs: *mut BootServices) {
assert!(bs.is_null(), "BootServices should not be NULL");
assert!(!bs.is_null(), "BootServices should not be NULL");
let boot_services = unsafe { &mut ptr::read(bs) };

let mut ptr: *mut c_void = ptr::null_mut();
Expand Down
6 changes: 5 additions & 1 deletion HidPkg/UefiHidDxe/src/pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ use hidparser::{
ReportDescriptor, ReportField, VariableField,
};
use memoffset::{offset_of, raw_field};
use r_efi::{efi, protocols::absolute_pointer, protocols::driver_binding, system};
use r_efi::{
efi,
protocols::{absolute_pointer, driver_binding},
system,
};
use rust_advanced_logger_dxe::{debugln, DEBUG_INFO, DEBUG_WARN};

use crate::{hid::HidContext, BOOT_SERVICES};
Expand Down

0 comments on commit e7fbc3b

Please sign in to comment.