Skip to content

Commit 079ac7e

Browse files
committed
Run rustfmt on all code
1 parent 81e60c3 commit 079ac7e

File tree

6 files changed

+14
-15
lines changed

6 files changed

+14
-15
lines changed

src/exts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! Utility functions for the most common UEFI patterns.
22
33
use alloc_api::{
4-
alloc::{AllocRef, Global, handle_alloc_error},
5-
boxed::Box
4+
alloc::{handle_alloc_error, AllocRef, Global},
5+
boxed::Box,
66
};
77
use core::{alloc::Layout, slice};
88

src/proto/loaded_image/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ use crate::{
44
data_types::{CStr16, Char16},
55
proto::Protocol,
66
table::boot::MemoryType,
7-
unsafe_guid,
8-
Handle,
9-
Status,
7+
unsafe_guid, Handle, Status,
108
};
119
use core::ffi::c_void;
1210

@@ -52,7 +50,8 @@ impl LoadedImage {
5250
/// option, this is the command line that was used to execute it as a string.
5351
pub fn load_options<'a>(&self, buffer: &'a mut [u8]) -> Result<&'a str, LoadOptionsError> {
5452
let ucs2_slice = unsafe { CStr16::from_ptr(self.load_options).to_u16_slice() };
55-
let length = ucs2::decode(ucs2_slice, buffer).map_err(|_| LoadOptionsError::BufferTooSmall)?;
53+
let length =
54+
ucs2::decode(ucs2_slice, buffer).map_err(|_| LoadOptionsError::BufferTooSmall)?;
5655
core::str::from_utf8(&buffer[0..length]).map_err(|_| LoadOptionsError::NotValidUtf8)
5756
}
5857
}

src/proto/media/fs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ use core::ptr;
1414
#[derive(Protocol)]
1515
pub struct SimpleFileSystem {
1616
revision: u64,
17-
open_volume: extern "efiapi" fn(this: &mut SimpleFileSystem, root: &mut *mut FileImpl) -> Status,
17+
open_volume:
18+
extern "efiapi" fn(this: &mut SimpleFileSystem, root: &mut *mut FileImpl) -> Status,
1819
}
1920

2021
impl SimpleFileSystem {

src/result/completion.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ impl<T> From<T> for Completion<T> {
9696
#[inline(never)]
9797
#[cold]
9898
fn built_with_error(error: Status) -> ! {
99-
panic!("Completion was incorrectly built with error status: {:?}", error)
99+
panic!(
100+
"Completion was incorrectly built with error status: {:?}",
101+
error
102+
)
100103
}
101104

102105
#[inline(never)]

src/table/boot.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@ pub struct BootServices {
4848
notify_ctx: *mut c_void,
4949
event: *mut Event,
5050
) -> Status,
51-
set_timer: unsafe extern "efiapi" fn(
52-
event: Event,
53-
ty: u32,
54-
trigger_time: u64
55-
) -> Status,
51+
set_timer: unsafe extern "efiapi" fn(event: Event, ty: u32, trigger_time: u64) -> Status,
5652
wait_for_event: unsafe extern "efiapi" fn(
5753
number_of_events: usize,
5854
events: *mut Event,

uefi-test-runner/src/boot/misc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use uefi::prelude::*;
2-
use uefi::table::boot::{BootServices, EventType, Tpl, TimerTrigger};
2+
use uefi::table::boot::{BootServices, EventType, TimerTrigger, Tpl};
33

44
pub fn test(bt: &BootServices) {
55
info!("Testing timer...");
@@ -18,7 +18,7 @@ fn test_timer(bt: &BootServices) {
1818
let timer_event = unsafe { bt.create_event(EventType::TIMER, Tpl::APPLICATION, None) }
1919
.expect_success("Failed to create TIMER event");
2020
let mut events = [timer_event];
21-
bt.set_timer(timer_event, TimerTrigger::Relative(5_0/*00 ns */))
21+
bt.set_timer(timer_event, TimerTrigger::Relative(5_0 /*00 ns */))
2222
.expect_success("Failed to set timer");
2323
bt.wait_for_event(&mut events)
2424
.expect_success("Wait for event failed");

0 commit comments

Comments
 (0)