File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -885,30 +885,28 @@ impl Drop for TempFile {
885
885
886
886
#[ test]
887
887
fn verify_check_works ( ) {
888
- let file_name = "temp_check.rs" ;
889
- let _temp_file = make_temp_file ( file_name) ;
888
+ let temp_file = make_temp_file ( "temp_check.rs" ) ;
890
889
assert_cli:: Assert :: command ( & [
891
890
"cargo" ,
892
891
"run" ,
893
892
"--bin=rustfmt" ,
894
893
"--" ,
895
894
"--write-mode=check" ,
896
- file_name ,
895
+ temp_file . path . to_str ( ) . unwrap ( ) ,
897
896
] ) . succeeds ( )
898
897
. unwrap ( ) ;
899
898
}
900
899
901
900
#[ test]
902
901
fn verify_diff_works ( ) {
903
- let file_name = "temp_diff.rs" ;
904
- let _temp_file = make_temp_file ( file_name) ;
902
+ let temp_file = make_temp_file ( "temp_diff.rs" ) ;
905
903
assert_cli:: Assert :: command ( & [
906
904
"cargo" ,
907
905
"run" ,
908
906
"--bin=rustfmt" ,
909
907
"--" ,
910
908
"--write-mode=diff" ,
911
- file_name ,
909
+ temp_file . path . to_str ( ) . unwrap ( ) ,
912
910
] ) . succeeds ( )
913
911
. unwrap ( ) ;
914
912
}
You can’t perform that action at this time.
0 commit comments