@@ -212,7 +212,7 @@ impl DbgpClient {
212212 }
213213
214214 pub ( crate ) async fn run ( & mut self ) -> Result < ContinuationResponse > {
215- match self . command ( "run" , & mut vec ! [ ] ) . await ? {
215+ match self . command ( "run" , & mut [ ] ) . await ? {
216216 Message :: Response ( r) => match r. command {
217217 CommandResponse :: Run ( s) => Ok ( s) ,
218218 _ => anyhow:: bail!( "Unexpected response" ) ,
@@ -223,7 +223,7 @@ impl DbgpClient {
223223
224224 pub ( crate ) async fn feature_set ( & mut self , feature : & str , value : & str ) -> Result < ( ) > {
225225 match self
226- . command ( "feature_set" , & mut vec ! [ "-n" , feature, "-v" , value] )
226+ . command ( "feature_set" , & mut [ "-n" , feature, "-v" , value] )
227227 . await ?
228228 {
229229 Message :: Response ( r) => match r. command {
@@ -235,7 +235,7 @@ impl DbgpClient {
235235 }
236236
237237 pub ( crate ) async fn context_get ( & mut self , depth : u16 ) -> Result < ContextGetResponse > {
238- match self . command ( "context_get" , & mut vec ! [ "-d" , format!( "{}" , depth) . as_str( ) ] ) . await ? {
238+ match self . command ( "context_get" , & mut [ "-d" , format ! ( "{}" , depth) . as_str ( ) ] ) . await ? {
239239 Message :: Response ( r) => match r. command {
240240 CommandResponse :: ContextGet ( s) => Ok ( s) ,
241241 _ => anyhow:: bail!( "Unexpected response" ) ,
@@ -245,7 +245,7 @@ impl DbgpClient {
245245 }
246246
247247 pub ( crate ) async fn step_into ( & mut self ) -> Result < ContinuationResponse > {
248- match self . command ( "step_into" , & mut vec ! [ ] ) . await ? {
248+ match self . command ( "step_into" , & mut [ ] ) . await ? {
249249 Message :: Response ( r) => match r. command {
250250 CommandResponse :: StepInto ( s) => Ok ( s) ,
251251 _ => anyhow:: bail!( "Unexpected response" ) ,
@@ -255,7 +255,7 @@ impl DbgpClient {
255255 }
256256
257257 pub ( crate ) async fn step_out ( & mut self ) -> Result < ContinuationResponse > {
258- match self . command ( "step_out" , & mut vec ! [ ] ) . await ? {
258+ match self . command ( "step_out" , & mut [ ] ) . await ? {
259259 Message :: Response ( r) => match r. command {
260260 CommandResponse :: StepInto ( s) => Ok ( s) ,
261261 _ => anyhow:: bail!( "Unexpected response" ) ,
@@ -265,7 +265,7 @@ impl DbgpClient {
265265 }
266266
267267 pub ( crate ) async fn step_over ( & mut self ) -> Result < ContinuationResponse > {
268- match self . command ( "step_over" , & mut vec ! [ ] ) . await ? {
268+ match self . command ( "step_over" , & mut [ ] ) . await ? {
269269 Message :: Response ( r) => match r. command {
270270 CommandResponse :: StepOver ( s) => Ok ( s) ,
271271 _ => anyhow:: bail!( "Unexpected response" ) ,
@@ -275,7 +275,7 @@ impl DbgpClient {
275275 }
276276
277277 pub ( crate ) async fn get_stack ( & mut self ) -> Result < StackGetResponse > {
278- match self . command ( "stack_get" , & mut vec ! [ "-n 0" ] ) . await ? {
278+ match self . command ( "stack_get" , & mut [ "-n 0" ] ) . await ? {
279279 Message :: Response ( r) => match r. command {
280280 CommandResponse :: StackGet ( s) => Ok ( s) ,
281281 _ => anyhow:: bail!( "Unexpected response" ) ,
@@ -286,7 +286,7 @@ impl DbgpClient {
286286
287287 pub ( crate ) async fn source ( & mut self , filename : String ) -> Result < String > {
288288 match self
289- . command ( "source" , & mut vec ! [ format!( "-f {}" , filename) . as_str( ) ] )
289+ . command ( "source" , & mut [ format ! ( "-f {}" , filename) . as_str ( ) ] )
290290 . await ?
291291 {
292292 Message :: Response ( r) => match r. command {
@@ -297,12 +297,12 @@ impl DbgpClient {
297297 }
298298 }
299299
300- async fn command ( & mut self , cmd : & str , args : & mut Vec < & str > ) -> Result < Message > {
300+ async fn command ( & mut self , cmd : & str , args : & mut [ & str ] ) -> Result < Message > {
301301 self . command_raw ( cmd, args) . await ?;
302302 self . read_and_parse ( ) . await
303303 }
304304
305- async fn command_raw ( & mut self , cmd : & str , args : & mut Vec < & str > ) -> Result < usize > {
305+ async fn command_raw ( & mut self , cmd : & str , args : & mut [ & str ] ) -> Result < usize > {
306306 let cmd_str = format ! ( "{} -i {} {}" , cmd, self . tid, args. join( " " ) ) ;
307307 debug ! ( "[dbgp] >> {}" , cmd_str) ;
308308 let bytes = [ cmd_str. trim_end ( ) , "\0 " ] . concat ( ) ;
0 commit comments