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 1
1
use std:: {
2
2
env:: { self , consts:: EXE_SUFFIX } ,
3
- fs,
4
3
process:: { Command , Stdio } ,
5
4
str:: from_utf8,
6
5
} ;
@@ -156,7 +155,6 @@ fn hint() {
156
155
#[ test]
157
156
fn init ( ) {
158
157
let test_dir = tempfile:: TempDir :: new ( ) . unwrap ( ) ;
159
- let initialized_dir = test_dir. path ( ) . join ( "rustlings" ) ;
160
158
let test_dir = test_dir. path ( ) . to_str ( ) . unwrap ( ) ;
161
159
162
160
Cmd :: default ( ) . current_dir ( test_dir) . fail ( ) ;
@@ -173,9 +171,11 @@ fn init() {
173
171
. output ( PartialStderr ( "`cd rustlings`" ) )
174
172
. fail ( ) ;
175
173
174
+ let initialized_dir = format ! ( "{test_dir}/rustlings" ) ;
175
+
176
176
// Running `init` in the initialized directory.
177
177
Cmd :: default ( )
178
- . current_dir ( initialized_dir. to_str ( ) . unwrap ( ) )
178
+ . current_dir ( & initialized_dir)
179
179
. args ( & [ "init" ] )
180
180
. output ( PartialStderr ( "already initialized" ) )
181
181
. fail ( ) ;
You can’t perform that action at this time.
0 commit comments