@@ -461,7 +461,7 @@ mod tests {
461
461
// Make a dir
462
462
let dir_path = Path :: new ( "test_dir" ) ;
463
463
let dir_repo_path = repo. path . join ( dir_path) ;
464
- util:: fs:: create_dir_all ( & dir_repo_path) ?;
464
+ util:: fs:: create_dir_all ( dir_repo_path) ?;
465
465
466
466
// File in the dir
467
467
let file_path = dir_path. join ( Path :: new ( "test_file.txt" ) ) ;
@@ -474,7 +474,7 @@ mod tests {
474
474
475
475
// New file in root
476
476
let file_path_2 = Path :: new ( "test_file_2.txt" ) ;
477
- let file_repo_path_2 = repo. path . join ( & file_path_2) ;
477
+ let file_repo_path_2 = repo. path . join ( file_path_2) ;
478
478
util:: fs:: write_to_path ( & file_repo_path_2, "test" ) ?;
479
479
480
480
// Add the file
@@ -483,9 +483,9 @@ mod tests {
483
483
484
484
// Now modify both files, add a third
485
485
let file_path_3 = Path :: new ( "test_file_3.txt" ) ;
486
- let file_repo_path_3 = repo. path . join ( & file_path_3) ;
486
+ let file_repo_path_3 = repo. path . join ( file_path_3) ;
487
487
488
- util:: fs:: write_to_path ( & file_repo_path_3, "test 3" ) ?;
488
+ util:: fs:: write_to_path ( file_repo_path_3, "test 3" ) ?;
489
489
util:: fs:: write_to_path ( & file_repo_path_2, "something different now" ) ?;
490
490
util:: fs:: write_to_path ( & file_repo_path, "something different now" ) ?;
491
491
@@ -494,22 +494,16 @@ mod tests {
494
494
495
495
let commit_3 = command:: commit ( & repo, "adding test file 2" ) ?;
496
496
497
- let branch = api:: local:: branches:: get_by_name ( & repo, DEFAULT_BRANCH_NAME ) ?. unwrap ( ) ;
497
+ let _branch = api:: local:: branches:: get_by_name ( & repo, DEFAULT_BRANCH_NAME ) ?. unwrap ( ) ;
498
498
499
499
let file_versions =
500
500
api:: local:: branches:: list_entry_versions_on_branch ( & repo, "main" , & file_path) ?;
501
501
502
- let file_2_versions = api:: local:: branches:: list_entry_versions_on_branch (
503
- & repo,
504
- "main" ,
505
- & file_path_2. to_path_buf ( ) ,
506
- ) ?;
502
+ let file_2_versions =
503
+ api:: local:: branches:: list_entry_versions_on_branch ( & repo, "main" , file_path_2) ?;
507
504
508
- let file_3_versions = api:: local:: branches:: list_entry_versions_on_branch (
509
- & repo,
510
- "main" ,
511
- & file_path_3. to_path_buf ( ) ,
512
- ) ?;
505
+ let file_3_versions =
506
+ api:: local:: branches:: list_entry_versions_on_branch ( & repo, "main" , file_path_3) ?;
513
507
514
508
assert_eq ! ( file_versions. len( ) , 2 ) ;
515
509
assert_eq ! ( file_versions[ 0 ] . 0 . id, commit_3. id) ;
@@ -549,8 +543,8 @@ mod tests {
549
543
550
544
// Add an irrelevant file - aka this isn't changing for commit 3
551
545
let file_path_2 = Path :: new ( "test_file_2.txt" ) ;
552
- let file_repo_path_2 = repo. path . join ( & file_path_2) ;
553
- util:: fs:: write_to_path ( & file_repo_path_2, "test" ) ?;
546
+ let file_repo_path_2 = repo. path . join ( file_path_2) ;
547
+ util:: fs:: write_to_path ( file_repo_path_2, "test" ) ?;
554
548
command:: add ( & repo, & repo. path ) ?;
555
549
let _commit_3 = command:: commit ( & repo, "adding test file 3" ) ?;
556
550
@@ -578,8 +572,8 @@ mod tests {
578
572
command:: add ( & repo, & repo. path ) ?;
579
573
let commit_6 = command:: commit ( & repo, "adding test file 6" ) ?;
580
574
581
- let main = api:: local:: branches:: get_by_name ( & repo, DEFAULT_BRANCH_NAME ) ?. unwrap ( ) ;
582
- let branch = api:: local:: branches:: get_by_name ( & repo, "test_branch" ) ?. unwrap ( ) ;
575
+ let _main = api:: local:: branches:: get_by_name ( & repo, DEFAULT_BRANCH_NAME ) ?. unwrap ( ) ;
576
+ let _branch = api:: local:: branches:: get_by_name ( & repo, "test_branch" ) ?. unwrap ( ) ;
583
577
let main_versions =
584
578
api:: local:: branches:: list_entry_versions_on_branch ( & repo, "main" , & file_path) ?;
585
579
0 commit comments