@@ -317,35 +317,35 @@ mod tests {
317
317
fn parse_fs_path_wc_in_cwd ( ) {
318
318
let temp_dir = testutils:: new_temp_dir ( ) ;
319
319
let cwd_path = temp_dir. path ( ) . join ( "repo" ) ;
320
- let wc_path = cwd_path. clone ( ) ;
320
+ let wc_path = & cwd_path;
321
321
322
322
assert_eq ! (
323
- RepoPath :: parse_fs_path( & cwd_path, & wc_path, "" ) ,
323
+ RepoPath :: parse_fs_path( & cwd_path, wc_path, "" ) ,
324
324
Ok ( RepoPath :: root( ) )
325
325
) ;
326
326
assert_eq ! (
327
- RepoPath :: parse_fs_path( & cwd_path, & wc_path, "." ) ,
327
+ RepoPath :: parse_fs_path( & cwd_path, wc_path, "." ) ,
328
328
Ok ( RepoPath :: root( ) )
329
329
) ;
330
330
assert_eq ! (
331
- RepoPath :: parse_fs_path( & cwd_path, & wc_path, "file" ) ,
331
+ RepoPath :: parse_fs_path( & cwd_path, wc_path, "file" ) ,
332
332
Ok ( RepoPath :: from_internal_string( "file" ) )
333
333
) ;
334
334
// Both slash and the platform's separator are allowed
335
335
assert_eq ! (
336
336
RepoPath :: parse_fs_path(
337
337
& cwd_path,
338
- & wc_path,
338
+ wc_path,
339
339
& format!( "dir{}file" , std:: path:: MAIN_SEPARATOR )
340
340
) ,
341
341
Ok ( RepoPath :: from_internal_string( "dir/file" ) )
342
342
) ;
343
343
assert_eq ! (
344
- RepoPath :: parse_fs_path( & cwd_path, & wc_path, "dir/file" ) ,
344
+ RepoPath :: parse_fs_path( & cwd_path, wc_path, "dir/file" ) ,
345
345
Ok ( RepoPath :: from_internal_string( "dir/file" ) )
346
346
) ;
347
347
assert_eq ! (
348
- RepoPath :: parse_fs_path( & cwd_path, & wc_path, ".." ) ,
348
+ RepoPath :: parse_fs_path( & cwd_path, wc_path, ".." ) ,
349
349
Err ( FsPathParseError :: InputNotInRepo ( ".." . to_string( ) ) )
350
350
) ;
351
351
assert_eq ! (
0 commit comments