Skip to content

Commit 3957b56

Browse files
committed
Do a cargo fmt pass
1 parent e67ff7f commit 3957b56

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

src/error/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,17 @@ impl<T> Completion<T> {
3333
Completion::Warning(res, stat) => {
3434
warn!("Encountered UEFI warning: {:?}", stat);
3535
res
36-
},
36+
}
3737
}
3838
}
3939

4040
/// Assume that no warning occured, panic if not
4141
pub fn unwrap(self) -> T {
4242
match self {
4343
Completion::Success(res) => res,
44-
Completion::Warning(_, w) =>
45-
unwrap_failed("Called `Completion::unwrap()` on a `Warning` value", w),
44+
Completion::Warning(_, w) => {
45+
unwrap_failed("Called `Completion::unwrap()` on a `Warning` value", w)
46+
}
4647
}
4748
}
4849

src/proto/console/text/input.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl Input {
3535

3636
match (self.read_key_stroke)(self, &mut key) {
3737
Status::NOT_READY => Ok(None.into()),
38-
other => other.into_with(|| Some(key))
38+
other => other.into_with(|| Some(key)),
3939
}
4040
}
4141

src/proto/console/text/output.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,9 @@ impl fmt::Write for Output {
159159
i += 1;
160160

161161
if i == BUF_SIZE {
162-
flush_buffer(&mut buf, &mut i).map_err(|_| ucs2::Error::BufferOverflow)
163-
.map(|completion| completion.value())
162+
flush_buffer(&mut buf, &mut i)
163+
.map_err(|_| ucs2::Error::BufferOverflow)
164+
.map(|completion| completion.value())
164165
} else {
165166
Ok(())
166167
}

src/table/boot.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ impl BootServices {
180180
&mut map_key,
181181
&mut entry_size,
182182
&mut entry_version,
183-
).into_with(move || {
183+
)
184+
.into_with(move || {
184185
let len = map_size / entry_size;
185186
let iter = MemoryMapIter {
186187
buffer,

uefi-exts/src/boot.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ impl BootServicesExt for BootServices {
2020
let search_type = SearchType::from_proto::<P>();
2121

2222
// Determine how much we need to allocate.
23-
let (buffer_size, warn1) = self.locate_handle(search_type, None)?
24-
.split();
23+
let (buffer_size, warn1) = self.locate_handle(search_type, None)?.split();
2524

2625
// Allocate a large enough buffer.
2726
let mut buffer = Vec::with_capacity(buffer_size);
@@ -31,22 +30,24 @@ impl BootServicesExt for BootServices {
3130
}
3231

3332
// Perform the search.
34-
let (buffer_size, warn2) = self.locate_handle(search_type, Some(&mut buffer))?
35-
.split();
33+
let (buffer_size, warn2) = self.locate_handle(search_type, Some(&mut buffer))?.split();
3634

3735
// Once the vector has been filled, update its size.
3836
unsafe {
3937
buffer.set_len(buffer_size);
4038
}
4139

42-
warn1.into_with(|| buffer).map(|completion| completion.with_warning(warn2))
40+
warn1
41+
.into_with(|| buffer)
42+
.map(|completion| completion.with_warning(warn2))
4343
}
4444

4545
fn find_protocol<P: Protocol>(&self) -> Option<NonNull<P>> {
4646
// Retrieve all handles implementing this.
4747
self.find_handles::<P>()
4848
// Convert to an option.
49-
.ok()?.value()
49+
.ok()?
50+
.value()
5051
// Using the `find_handles` function might not return _only_ compatible protocols.
5152
// We have to retrieve them all and find one that works.
5253
.iter()

0 commit comments

Comments
 (0)