File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55[workspace ]
66
7- resolver = " 2 "
7+ resolver = " 3 "
88
99members = [
1010 " tockloader-cli" ,
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ fn get_channel_args() -> Vec<clap::Arg> {
7171 . collect :: < Vec < _ > > ( ) ;
7272
7373 vec ! [
74+ // TODO(george-cosma): Change default to pconsole when new format is implemented and adopted into tock
7475 arg!( --protocol <PROTOCOL > "Choose between legacy and pconsole protocol" )
7576 . default_value( "legacy" )
7677 . value_parser( [ "legacy" , "pconsole" ] ) ,
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ fn get_board_settings(user_options: &ArgMatches) -> BoardSettings {
7272}
7373
7474fn using_serial ( user_options : & ArgMatches ) -> bool {
75+ // TODO: refactor this in the future
7576 * user_options. get_one :: < bool > ( "serial" ) . unwrap_or ( & false )
7677 || user_options
7778 . get_one :: < String > ( "protocol" )
@@ -139,7 +140,7 @@ async fn main() -> Result<()> {
139140 let protocol = sub_matches
140141 . get_one :: < String > ( "protocol" )
141142 . map ( String :: as_str)
142- . unwrap_or ( "legacy" ) ;
143+ . unwrap ( ) ;
143144 match protocol {
144145 "legacy" => {
145146 let conn = open_connection ( sub_matches) . await ?;
@@ -148,7 +149,7 @@ async fn main() -> Result<()> {
148149 TockloaderConnection :: Serial ( serial_connection) => {
149150 tock_process_console:: legacy:: run (
150151 serial_connection
151- . get_stream ( )
152+ . into_inner_stream ( )
152153 . expect ( "Expected board to be connected." ) ,
153154 )
154155 . await ;
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ impl SerialConnection {
117117 port,
118118 }
119119 }
120- pub fn get_stream ( self ) -> Option < SerialStream > {
120+ pub fn into_inner_stream ( self ) -> Option < SerialStream > {
121121 self . stream
122122 }
123123}
You can’t perform that action at this time.
0 commit comments