File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11use std:: {
22 env:: { self , consts:: EXE_SUFFIX } ,
3- fs,
43 process:: { Command , Stdio } ,
54 str:: from_utf8,
65} ;
@@ -156,7 +155,6 @@ fn hint() {
156155#[ test]
157156fn init ( ) {
158157 let test_dir = tempfile:: TempDir :: new ( ) . unwrap ( ) ;
159- let initialized_dir = test_dir. path ( ) . join ( "rustlings" ) ;
160158 let test_dir = test_dir. path ( ) . to_str ( ) . unwrap ( ) ;
161159
162160 Cmd :: default ( ) . current_dir ( test_dir) . fail ( ) ;
@@ -173,9 +171,11 @@ fn init() {
173171 . output ( PartialStderr ( "`cd rustlings`" ) )
174172 . fail ( ) ;
175173
174+ let initialized_dir = format ! ( "{test_dir}/rustlings" ) ;
175+
176176 // Running `init` in the initialized directory.
177177 Cmd :: default ( )
178- . current_dir ( initialized_dir. to_str ( ) . unwrap ( ) )
178+ . current_dir ( & initialized_dir)
179179 . args ( & [ "init" ] )
180180 . output ( PartialStderr ( "already initialized" ) )
181181 . fail ( ) ;
You can’t perform that action at this time.
0 commit comments