@@ -17,6 +17,7 @@ pub fn teardown() {
1717 } ) ;
1818}
1919
20+ #[ allow( dead_code) ]
2021pub fn copy_dir_recursive ( from : & Path , to : & Path ) {
2122 fs:: create_dir_all ( to) . expect ( "failed to create destination root" ) ;
2223 for entry in fs:: read_dir ( from) . expect ( "failed to read source dir" ) {
@@ -35,6 +36,7 @@ pub fn copy_dir_recursive(from: &Path, to: &Path) {
3536 }
3637}
3738
39+ #[ allow( dead_code) ]
3840pub fn init_git_repo ( path : & Path ) {
3941 let status = Command :: new ( "git" )
4042 . arg ( "init" )
@@ -61,6 +63,7 @@ pub fn init_git_repo(path: &Path) {
6163 . output ( ) ;
6264}
6365
66+ #[ allow( dead_code) ]
6467pub fn is_file_staged ( repo_root : & Path , rel_path : & str ) -> bool {
6568 let output = Command :: new ( "git" )
6669 . arg ( "diff" )
@@ -78,6 +81,7 @@ pub fn is_file_staged(repo_root: &Path, rel_path: &str) -> bool {
7881 stdout. lines ( ) . any ( |line| line. trim ( ) == rel_path)
7982}
8083
84+ #[ allow( dead_code) ]
8185pub fn build_run_config ( project_root : & Path , codeowners_rel_path : & str ) -> RunConfig {
8286 let project_root = project_root. canonicalize ( ) . expect ( "failed to canonicalize project root" ) ;
8387 let codeowners_file_path = project_root. join ( codeowners_rel_path) ;
@@ -90,13 +94,15 @@ pub fn build_run_config(project_root: &Path, codeowners_rel_path: &str) -> RunCo
9094 }
9195}
9296
97+ #[ allow( dead_code) ]
9398pub fn setup_fixture_repo ( fixture_root : & Path ) -> TempDir {
9499 let temp_dir = tempfile:: tempdir ( ) . expect ( "failed to create tempdir" ) ;
95100 copy_dir_recursive ( fixture_root, temp_dir. path ( ) ) ;
96101 init_git_repo ( temp_dir. path ( ) ) ;
97102 temp_dir
98103}
99104
105+ #[ allow( dead_code) ]
100106pub fn assert_no_run_errors ( result : & runner:: RunResult ) {
101107 assert ! ( result. io_errors. is_empty( ) , "io_errors: {:?}" , result. io_errors) ;
102108 assert ! (
0 commit comments