File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,12 @@ use uefi::data_types::Align;
1515/// - return a mutable typed reference (which points to the same memory as the input buffer) on
1616/// success, and
1717/// - return the required buffer size on error.
18- pub fn make_boxed < ' a , Data : Align + ?Sized + Debug + ' a > (
19- mut fetch_data_fn : impl FnMut ( & ' a mut [ u8 ] ) -> Result < & ' a mut Data , Option < usize > > ,
18+ pub fn make_boxed <
19+ ' a ,
20+ Data : Align + ?Sized + Debug + ' a ,
21+ F : FnMut ( & ' a mut [ u8 ] ) -> Result < & ' a mut Data , Option < usize > > ,
22+ > (
23+ mut fetch_data_fn : F ,
2024) -> Result < Box < Data > > {
2125 let required_size: usize = match fetch_data_fn ( & mut [ ] )
2226 . expect_err ( "succeeded unexpectedly" )
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ impl Directory {
7777 maybe_info. expect ( "Should have more entries" )
7878 } )
7979 } ;
80- let file_info = make_boxed :: < FileInfo > ( fetch_data_fn) ?;
80+ let file_info = make_boxed :: < FileInfo , _ > ( fetch_data_fn) ?;
8181 Ok ( Some ( file_info) )
8282 }
8383
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ pub trait File: Sized {
165165 /// Get the dynamically allocated info for a file
166166 fn get_boxed_info < Info : FileProtocolInfo + ?Sized + Debug > ( & mut self ) -> Result < Box < Info > > {
167167 let fetch_data_fn = |buf| self . get_info :: < Info > ( buf) ;
168- let file_info = make_boxed :: < Info > ( fetch_data_fn) ?;
168+ let file_info = make_boxed :: < Info , _ > ( fetch_data_fn) ?;
169169 Ok ( file_info)
170170 }
171171
You can’t perform that action at this time.
0 commit comments