@@ -111,8 +111,12 @@ async fn open_connection(user_options: &ArgMatches) -> Result<TockloaderConnecti
111111 . context ( "No device is connected." ) ?
112112 } ;
113113
114- let mut conn: TockloaderConnection =
115- SerialConnection :: new ( path, get_serial_target_info ( user_options) ) . into ( ) ;
114+ let mut conn: TockloaderConnection = SerialConnection :: new (
115+ path,
116+ get_serial_target_info ( user_options) ,
117+ get_board_settings ( user_options) ,
118+ )
119+ . into ( ) ;
116120 conn. open ( )
117121 . await
118122 . context ( "Failed to open serial connection." ) ?;
@@ -124,8 +128,12 @@ async fn open_connection(user_options: &ArgMatches) -> Result<TockloaderConnecti
124128 . prompt ( )
125129 . context ( "No debug probe is connected." ) ?;
126130
127- let mut conn: TockloaderConnection =
128- ProbeRSConnection :: new ( ans, get_probe_target_info ( user_options) ) . into ( ) ;
131+ let mut conn: TockloaderConnection = ProbeRSConnection :: new (
132+ ans,
133+ get_probe_target_info ( user_options) ,
134+ get_board_settings ( user_options) ,
135+ )
136+ . into ( ) ;
129137
130138 conn. open ( )
131139 . await
@@ -199,19 +207,17 @@ async fn main() -> Result<()> {
199207 cli:: validate ( & mut cmd, sub_matches) ;
200208
201209 let mut conn = open_connection ( sub_matches) . await ?;
202- let settings = get_board_settings ( sub_matches) ;
203210
204- let app_details = conn. list ( & settings ) . await . context ( "Failed to list apps." ) ?;
211+ let app_details = conn. list ( ) . await . context ( "Failed to list apps." ) ?;
205212
206213 display:: print_list ( & app_details) . await ;
207214 }
208215 Some ( ( "info" , sub_matches) ) => {
209216 cli:: validate ( & mut cmd, sub_matches) ;
210217 let mut conn = open_connection ( sub_matches) . await ?;
211- let settings = get_board_settings ( sub_matches) ;
212218
213219 let mut attributes = conn
214- . info ( & settings )
220+ . info ( )
215221 . await
216222 . context ( "Failed to get data from the board." ) ?;
217223
@@ -223,20 +229,16 @@ async fn main() -> Result<()> {
223229 . context ( "Failed to use provided tab file." ) ?;
224230
225231 let mut conn = open_connection ( sub_matches) . await ?;
226- let settings = get_board_settings ( sub_matches) ;
227232
228- conn. install_app ( & settings , tab_file)
233+ conn. install_app ( tab_file)
229234 . await
230235 . context ( "Failed to install app." ) ?;
231236 }
232237 Some ( ( "erase-apps" , sub_matches) ) => {
233238 cli:: validate ( & mut cmd, sub_matches) ;
234239 let mut conn = open_connection ( sub_matches) . await ?;
235- let settings = get_board_settings ( sub_matches) ;
236240
237- conn. erase_apps ( & settings)
238- . await
239- . context ( "Failed to erase apps." ) ?;
241+ conn. erase_apps ( ) . await . context ( "Failed to erase apps." ) ?;
240242 }
241243 _ => {
242244 println ! ( "Could not run the provided subcommand." ) ;
0 commit comments