File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ impl FPTArea {
8080 Gen2Partition :: Dir ( d) => Some ( d. clone ( ) ) ,
8181 _ => None ,
8282 } )
83- . collect :: < Vec < DirPartition > > ( ) ;
83+ . collect :: < Vec < Box < DirPartition > > > ( ) ;
8484 dirs. iter ( )
8585 . map ( |d| ( d. entry . name ( ) , d. check_signature ( ) ) )
8686 . collect ( )
@@ -104,14 +104,14 @@ impl FPTArea {
104104 pub fn check_ftpr_presence ( & self ) -> Result < ( ) , String > {
105105 match & self . partitions {
106106 Partitions :: Gen2 ( parts) => {
107- if parts. iter ( ) . find ( |p| p. entry ( ) . name ( ) == FTPR ) . is_some ( ) {
107+ if parts. iter ( ) . any ( |p| p. entry ( ) . name ( ) == FTPR ) {
108108 Ok ( ( ) )
109109 } else {
110110 Err ( "not found" . into ( ) )
111111 }
112112 }
113113 Partitions :: Gen3 ( parts) => {
114- if parts. iter ( ) . find ( |p| p. entry ( ) . name ( ) == FTPR ) . is_some ( ) {
114+ if parts. iter ( ) . any ( |p| p. entry ( ) . name ( ) == FTPR ) {
115115 Ok ( ( ) )
116116 } else {
117117 Err ( "not found" . into ( ) )
@@ -190,10 +190,7 @@ impl FPTArea {
190190 println ! ( "Recreate ME region from components" ) ;
191191 }
192192
193- let mut res = match self . partitions . to_vec ( ) {
194- Ok ( r) => r,
195- Err ( e) => return Err ( e) ,
196- } ;
193+ let mut res = self . partitions . to_vec ( ) ?;
197194 if debug {
198195 println ! ( " Minimum size: {:08x}" , res. len( ) ) ;
199196 }
You can’t perform that action at this time.
0 commit comments