@@ -89,7 +89,7 @@ async fn a_box_can_be_created_used_and_removed() -> Result<()> {
8989 let removed = invoke ( dir. path ( ) , & [ "rm" , "box-0" ] ) . await ;
9090 assert_eq ! ( removed. code, 0 ) ;
9191
92- assert ! ( invoke( dir. path( ) , & [ "ls" ] ) . await . out. is_empty ( ) ) ;
92+ assert_eq ! ( invoke( dir. path( ) , & [ "ls" ] ) . await . out. len ( ) , 0 ) ;
9393 Ok ( ( ) )
9494}
9595
@@ -197,7 +197,7 @@ async fn run_creates_uses_and_destroys_a_box_in_one_step() -> Result<()> {
197197 assert_eq ! ( executed. code, 0 ) ;
198198 assert_eq ! ( executed. out. trim( ) , "once" ) ;
199199 // Nothing is left behind.
200- assert ! ( invoke( dir. path( ) , & [ "ls" ] ) . await . out. is_empty ( ) ) ;
200+ assert_eq ! ( invoke( dir. path( ) , & [ "ls" ] ) . await . out. len ( ) , 0 ) ;
201201 Ok ( ( ) )
202202}
203203
@@ -209,7 +209,7 @@ async fn run_leaves_nothing_behind_when_the_command_fails() -> Result<()> {
209209
210210 assert_eq ! ( executed. code, 3 ) ;
211211 // A failing command must not leak a box; the cleanup is unconditional.
212- assert ! ( invoke( dir. path( ) , & [ "ls" ] ) . await . out. is_empty ( ) ) ;
212+ assert_eq ! ( invoke( dir. path( ) , & [ "ls" ] ) . await . out. len ( ) , 0 ) ;
213213 Ok ( ( ) )
214214}
215215
@@ -225,7 +225,7 @@ async fn run_reports_a_command_that_cannot_start_and_still_cleans_up() -> Result
225225
226226 assert_eq ! ( executed. code, EXIT_TINYBOX_ERROR ) ;
227227 assert ! ( executed. err. contains( "error:" ) ) ;
228- assert ! ( invoke( dir. path( ) , & [ "ls" ] ) . await . out. is_empty ( ) ) ;
228+ assert_eq ! ( invoke( dir. path( ) , & [ "ls" ] ) . await . out. len ( ) , 0 ) ;
229229 Ok ( ( ) )
230230}
231231
@@ -313,7 +313,7 @@ async fn a_usage_error_reports_clap_s_exit_code() -> Result<()> {
313313 let outcome = invoke ( dir. path ( ) , & [ "not-a-command" ] ) . await ;
314314
315315 assert_eq ! ( outcome. code, 2 ) ;
316- assert ! ( ! outcome. err. is_empty ( ) ) ;
316+ assert_ne ! ( outcome. err. len ( ) , 0 ) ;
317317 Ok ( ( ) )
318318}
319319
@@ -343,8 +343,8 @@ async fn requested_help_goes_to_stdout_and_usage_errors_to_stderr() -> Result<()
343343 // A mistake is a diagnostic, and stays on stderr.
344344 let misuse = invoke ( dir. path ( ) , & [ "not-a-command" ] ) . await ;
345345 assert_eq ! ( misuse. code, 2 ) ;
346- assert ! ( misuse. out. is_empty ( ) ) ;
347- assert ! ( ! misuse. err. is_empty ( ) ) ;
346+ assert_eq ! ( misuse. out. len ( ) , 0 ) ;
347+ assert_ne ! ( misuse. err. len ( ) , 0 ) ;
348348 Ok ( ( ) )
349349}
350350
@@ -848,11 +848,12 @@ async fn a_one_shot_docker_run_leaves_nothing_behind() -> Result<()> {
848848
849849 assert_eq ! ( executed. code, 0 ) ;
850850 assert_eq ! ( executed. out. trim( ) , "once" ) ;
851- assert ! (
851+ assert_eq ! (
852852 invoke_scripted( dir. path( ) , host. clone( ) , & [ "ls" ] )
853853 . await
854854 . out
855- . is_empty( )
855+ . len( ) ,
856+ 0
856857 ) ;
857858 Ok ( ( ) )
858859}
@@ -932,7 +933,7 @@ async fn an_ssh_destination_that_would_be_read_as_an_option_is_refused() -> Resu
932933
933934 assert_eq ! ( outcome. code, EXIT_TINYBOX_ERROR ) ;
934935 assert ! ( outcome. err. contains( "ssh destination" ) ) ;
935- assert ! ( host. commands( ) . is_empty ( ) ) ;
936+ assert_eq ! ( host. commands( ) . len ( ) , 0 ) ;
936937 Ok ( ( ) )
937938}
938939
@@ -1151,7 +1152,7 @@ async fn templates_can_be_listed_and_forgotten() -> Result<()> {
11511152 assert ! ( listed. out. contains( "sha-9f2c0e1b7a4d" ) ) ;
11521153
11531154 assert_eq ! ( invoke( dir. path( ) , & [ "template" , "rm" , "ci" ] ) . await . code, 0 ) ;
1154- assert ! ( invoke( dir. path( ) , & [ "template" , "ls" ] ) . await . out. is_empty ( ) ) ;
1155+ assert_eq ! ( invoke( dir. path( ) , & [ "template" , "ls" ] ) . await . out. len ( ) , 0 ) ;
11551156 Ok ( ( ) )
11561157}
11571158
0 commit comments