File tree Expand file tree Collapse file tree 5 files changed +17
-13
lines changed Expand file tree Collapse file tree 5 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -33,16 +33,17 @@ impl<T> Completion<T> {
33
33
Completion :: Warning ( res, stat) => {
34
34
warn ! ( "Encountered UEFI warning: {:?}" , stat) ;
35
35
res
36
- } ,
36
+ }
37
37
}
38
38
}
39
39
40
40
/// Assume that no warning occured, panic if not
41
41
pub fn unwrap ( self ) -> T {
42
42
match self {
43
43
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
+ }
46
47
}
47
48
}
48
49
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ impl Input {
35
35
36
36
match ( self . read_key_stroke ) ( self , & mut key) {
37
37
Status :: NOT_READY => Ok ( None . into ( ) ) ,
38
- other => other. into_with ( || Some ( key) )
38
+ other => other. into_with ( || Some ( key) ) ,
39
39
}
40
40
}
41
41
Original file line number Diff line number Diff line change @@ -159,8 +159,9 @@ impl fmt::Write for Output {
159
159
i += 1 ;
160
160
161
161
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 ( ) )
164
165
} else {
165
166
Ok ( ( ) )
166
167
}
Original file line number Diff line number Diff line change @@ -180,7 +180,8 @@ impl BootServices {
180
180
& mut map_key,
181
181
& mut entry_size,
182
182
& mut entry_version,
183
- ) . into_with ( move || {
183
+ )
184
+ . into_with ( move || {
184
185
let len = map_size / entry_size;
185
186
let iter = MemoryMapIter {
186
187
buffer,
Original file line number Diff line number Diff line change @@ -20,8 +20,7 @@ impl BootServicesExt for BootServices {
20
20
let search_type = SearchType :: from_proto :: < P > ( ) ;
21
21
22
22
// 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 ( ) ;
25
24
26
25
// Allocate a large enough buffer.
27
26
let mut buffer = Vec :: with_capacity ( buffer_size) ;
@@ -31,22 +30,24 @@ impl BootServicesExt for BootServices {
31
30
}
32
31
33
32
// 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 ( ) ;
36
34
37
35
// Once the vector has been filled, update its size.
38
36
unsafe {
39
37
buffer. set_len ( buffer_size) ;
40
38
}
41
39
42
- warn1. into_with ( || buffer) . map ( |completion| completion. with_warning ( warn2) )
40
+ warn1
41
+ . into_with ( || buffer)
42
+ . map ( |completion| completion. with_warning ( warn2) )
43
43
}
44
44
45
45
fn find_protocol < P : Protocol > ( & self ) -> Option < NonNull < P > > {
46
46
// Retrieve all handles implementing this.
47
47
self . find_handles :: < P > ( )
48
48
// Convert to an option.
49
- . ok ( ) ?. value ( )
49
+ . ok ( ) ?
50
+ . value ( )
50
51
// Using the `find_handles` function might not return _only_ compatible protocols.
51
52
// We have to retrieve them all and find one that works.
52
53
. iter ( )
You can’t perform that action at this time.
0 commit comments