@@ -21,25 +21,8 @@ use crate::IO;
2121#[ derive( Debug , Clone ) ]
2222pub struct AppAttributes {
2323 pub address : u64 ,
24- pub size : u32 ,
25- pub index : u8 ,
2624 pub tbf_header : TbfHeader ,
2725 pub tbf_footers : Vec < TbfFooter > ,
28- pub installed : bool ,
29- pub is_padding : bool ,
30- }
31-
32- impl std:: fmt:: Display for AppAttributes {
33- fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
34- write ! (
35- f,
36- "{}. {} - start: {:#x}, size: {}" ,
37- self . index,
38- self . tbf_header. get_package_name( ) . unwrap_or( "" ) ,
39- self . address,
40- self . size
41- )
42- }
4326}
4427
4528/// This structure represents a footer of a Tock application. Currently, footers
@@ -62,20 +45,13 @@ impl TbfFooter {
6245impl AppAttributes {
6346 pub ( crate ) fn new (
6447 address : u64 ,
65- size : u32 ,
66- index : u8 ,
6748 header_data : TbfHeader ,
6849 footers_data : Vec < TbfFooter > ,
69- installed : bool ,
7050 ) -> AppAttributes {
7151 AppAttributes {
7252 address,
73- size,
74- index,
7553 tbf_header : header_data,
7654 tbf_footers : footers_data,
77- installed,
78- is_padding : false ,
7955 }
8056 }
8157
@@ -178,10 +154,9 @@ impl AppAttributes {
178154 footer_offset += footer_info. 1 + 4 ;
179155 }
180156
181- let details: AppAttributes =
182- AppAttributes :: new ( appaddr, total_size, apps_counter, header, footers, true ) ;
157+ let details: AppAttributes = AppAttributes :: new ( appaddr, header, footers) ;
183158
184- apps_details. insert ( apps_counter. into ( ) , details) ;
159+ apps_details. insert ( apps_counter, details) ;
185160 apps_counter += 1 ;
186161 appaddr += total_size as u64 ;
187162 }
@@ -316,10 +291,9 @@ impl AppAttributes {
316291 footer_offset += footer_info. 1 + 4 ;
317292 }
318293
319- let details: AppAttributes =
320- AppAttributes :: new ( appaddr, total_size, apps_counter, header, footers, true ) ;
294+ let details: AppAttributes = AppAttributes :: new ( appaddr, header, footers) ;
321295
322- apps_details. insert ( apps_counter. into ( ) , details) ;
296+ apps_details. insert ( apps_counter, details) ;
323297 apps_counter += 1 ;
324298 appaddr += total_size as u64 ;
325299 }
0 commit comments