@@ -73,7 +73,7 @@ mod tests {
7373 . join ( "cloud-init" )
7474 . join ( "clear" )
7575 . join ( "openstack" ) ;
76- fs:: create_dir_all ( & cloud_init_directory. join ( "latest" ) )
76+ fs:: create_dir_all ( cloud_init_directory. join ( "latest" ) )
7777 . expect ( "Expect creating cloud-init directory to succeed" ) ;
7878 let source_file_dir = std:: env:: current_dir ( )
7979 . unwrap ( )
@@ -101,15 +101,15 @@ mod tests {
101101 . write_all ( user_data_string. as_bytes ( ) )
102102 . expect ( "Expected writing out user_data to succeed" ) ;
103103 std:: process:: Command :: new ( "mkdosfs" )
104- . args ( & [ "-n" , "config-2" ] )
105- . args ( & [ "-C" , cloudinit_file_path. as_str ( ) ] )
104+ . args ( [ "-n" , "config-2" ] )
105+ . args ( [ "-C" , cloudinit_file_path. as_str ( ) ] )
106106 . arg ( "8192" )
107107 . output ( )
108108 . expect ( "Expect creating disk image to succeed" ) ;
109109 std:: process:: Command :: new ( "mcopy" )
110110 . arg ( "-o" )
111- . args ( & [ "-i" , cloudinit_file_path. as_str ( ) ] )
112- . args ( & [ "-s" , cloud_init_directory. to_str ( ) . unwrap ( ) , "::" ] )
111+ . args ( [ "-i" , cloudinit_file_path. as_str ( ) ] )
112+ . args ( [ "-s" , cloud_init_directory. to_str ( ) . unwrap ( ) , "::" ] )
113113 . output ( )
114114 . expect ( "Expect copying files to disk image to succeed" ) ;
115115 cloudinit_file_path
@@ -156,8 +156,8 @@ mod tests {
156156 . expect ( "Expected writing out network-config to succeed" ) ;
157157
158158 std:: process:: Command :: new ( "mkdosfs" )
159- . args ( & [ "-n" , "cidata" ] )
160- . args ( & [ "-C" , cloudinit_file_path. as_str ( ) ] )
159+ . args ( [ "-n" , "cidata" ] )
160+ . args ( [ "-C" , cloudinit_file_path. as_str ( ) ] )
161161 . arg ( "8192" )
162162 . output ( )
163163 . expect ( "Expect creating disk image to succeed" ) ;
@@ -167,8 +167,8 @@ mod tests {
167167 . for_each ( |x| {
168168 std:: process:: Command :: new ( "mcopy" )
169169 . arg ( "-o" )
170- . args ( & [ "-i" , cloudinit_file_path. as_str ( ) ] )
171- . args ( & [ "-s" , cloud_init_directory. join ( x) . to_str ( ) . unwrap ( ) , "::" ] )
170+ . args ( [ "-i" , cloudinit_file_path. as_str ( ) ] )
171+ . args ( [ "-s" , cloud_init_directory. join ( x) . to_str ( ) . unwrap ( ) , "::" ] )
172172 . output ( )
173173 . expect ( "Expect copying files to disk image to succeed" ) ;
174174 } ) ;
@@ -215,7 +215,7 @@ mod tests {
215215
216216 // losetup -d <loopback_device>
217217 std:: process:: Command :: new ( "losetup" )
218- . args ( & [ "-d" , self . loopback_device . as_str ( ) ] )
218+ . args ( [ "-d" , self . loopback_device . as_str ( ) ] )
219219 . output ( )
220220 . expect ( "Expect removing loopback device to succeed" ) ;
221221 }
@@ -266,7 +266,7 @@ mod tests {
266266 std:: process:: Command :: new ( "dmsetup" )
267267 . arg ( "create" )
268268 . arg ( windows_snapshot_cow. as_str ( ) )
269- . args ( & [
269+ . args ( [
270270 "--table" ,
271271 format ! (
272272 "0 {} linear {} 0" ,
@@ -289,7 +289,7 @@ mod tests {
289289 std:: process:: Command :: new ( "dmsetup" )
290290 . arg ( "create" )
291291 . arg ( windows_snapshot. as_str ( ) )
292- . args ( & [
292+ . args ( [
293293 "--table" ,
294294 format ! (
295295 "0 {} snapshot /dev/mapper/windows-base /dev/mapper/{} P 8" ,
@@ -315,14 +315,14 @@ mod tests {
315315 fn prepare_os_disk ( tmp_dir : & TempDir , image_name : & str ) -> String {
316316 let src_osdisk = dirs:: home_dir ( ) . unwrap ( ) . join ( "workloads" ) . join ( image_name) ;
317317 let dest_osdisk = tmp_dir. path ( ) . join ( image_name) ;
318- fs:: copy ( & src_osdisk, & dest_osdisk) . expect ( "Expect copying OS disk to succeed" ) ;
318+ fs:: copy ( src_osdisk, & dest_osdisk) . expect ( "Expect copying OS disk to succeed" ) ;
319319
320320 dest_osdisk. to_str ( ) . unwrap ( ) . to_owned ( )
321321 }
322322
323323 fn prepare_tap ( net : & GuestNetworkConfig ) {
324324 assert ! ( std:: process:: Command :: new( "bash" )
325- . args( & [
325+ . args( [
326326 "-c" ,
327327 & format!( "sudo ip tuntap add name {} mode tap" , net. tap_name) ,
328328 ] )
@@ -331,7 +331,7 @@ mod tests {
331331 . success( ) ) ;
332332
333333 assert ! ( std:: process:: Command :: new( "bash" )
334- . args( & [
334+ . args( [
335335 "-c" ,
336336 & format!( "sudo ip addr add {}/24 dev {}" , net. host_ip, net. tap_name) ,
337337 ] )
@@ -340,15 +340,15 @@ mod tests {
340340 . success( ) ) ;
341341
342342 assert ! ( std:: process:: Command :: new( "bash" )
343- . args( & [ "-c" , & format!( "sudo ip link set dev {} up" , net. tap_name) ] )
343+ . args( [ "-c" , & format!( "sudo ip link set dev {} up" , net. tap_name) ] )
344344 . status( )
345345 . expect( "Expected upping interface to work" )
346346 . success( ) ) ;
347347 }
348348
349349 fn cleanup_tap ( net : & GuestNetworkConfig ) {
350350 assert ! ( std:: process:: Command :: new( "bash" )
351- . args( & [
351+ . args( [
352352 "-c" ,
353353 & format!( "sudo ip tuntap de name {} mode tap" , net. tap_name) ,
354354 ] )
@@ -491,7 +491,7 @@ mod tests {
491491 . join ( "workloads" )
492492 . join ( "cloud-hypervisor" ) ;
493493 let mut c = Command :: new ( clh_path. to_str ( ) . unwrap ( ) ) ;
494- c. args ( & [
494+ c. args ( [
495495 "--console" ,
496496 "off" ,
497497 "--serial" ,
@@ -523,7 +523,7 @@ mod tests {
523523 net : & GuestNetworkConfig ,
524524 ) -> Child {
525525 let mut c = Command :: new ( "qemu-system-x86_64" ) ;
526- c. args ( & [
526+ c. args ( [
527527 "-machine" ,
528528 "q35,accel=kvm" ,
529529 "-cpu" ,
@@ -685,7 +685,7 @@ mod tests {
685685 prepare_tap ( & net) ;
686686
687687 let mut c = Command :: new ( "qemu-system-x86_64" ) ;
688- c. args ( & [
688+ c. args ( [
689689 "-machine" ,
690690 "q35,accel=kvm" ,
691691 "-cpu" ,
@@ -771,7 +771,7 @@ mod tests {
771771 . join ( "workloads" )
772772 . join ( "cloud-hypervisor" ) ;
773773 let mut c = Command :: new ( clh_path. to_str ( ) . unwrap ( ) ) ;
774- c. args ( & [
774+ c. args ( [
775775 "--cpus" ,
776776 "boot=2,kvm_hyperv=on" ,
777777 "--memory" ,
0 commit comments