File tree 1 file changed +13
-11
lines changed
1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -85,25 +85,27 @@ impl DiskImageBuilder {
85
85
let bytes = json. as_bytes ( ) ;
86
86
self . set_file_source ( FileDataSource :: Data ( bytes. to_vec ( ) ) , CONFIG_FILE_NAME )
87
87
}
88
-
89
- pub fn set_file_source ( & mut self , source : FileDataSource , destination : & str , ) -> & mut Self {
88
+
89
+ pub fn set_file_source ( & mut self , source : FileDataSource , destination : & str ) -> & mut Self {
90
90
let destination = destination. to_string ( ) ;
91
- self . files . insert ( 0 , DiskImageFile { source, destination } ) ;
91
+ self . files . insert (
92
+ 0 ,
93
+ DiskImageFile {
94
+ source,
95
+ destination,
96
+ } ,
97
+ ) ;
92
98
self
93
99
}
94
100
95
- pub fn set_file_contents ( & mut self , data : & [ u8 ] , destination : & str , ) -> & mut Self {
101
+ pub fn set_file_contents ( & mut self , data : & [ u8 ] , destination : & str ) -> & mut Self {
96
102
self . set_file_source ( FileDataSource :: Data ( data. to_vec ( ) ) , destination)
97
103
}
98
104
99
- pub fn set_file (
100
- & mut self ,
101
- file_path : & Path ,
102
- destination : & str ,
103
- ) -> & mut Self {
104
- self . set_file_source ( FileDataSource :: File ( file_path. to_path_buf ( ) ) , destination)
105
+ pub fn set_file ( & mut self , file_path : & Path , destination : & str ) -> & mut Self {
106
+ self . set_file_source ( FileDataSource :: File ( file_path. to_path_buf ( ) ) , destination)
105
107
}
106
-
108
+
107
109
fn create_fat_filesystem_image (
108
110
& self ,
109
111
internal_files : BTreeMap < & str , FileDataSource > ,
You can’t perform that action at this time.
0 commit comments