File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ pub(crate) mod codeowners_file_parser;
1313pub ( crate ) mod codeowners_query;
1414mod file_generator;
1515mod file_owner_finder;
16- pub mod for_file_fast ;
16+ pub mod file_owner_resolver ;
1717pub ( crate ) mod mapper;
1818mod validator;
1919
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ impl Runner {
176176 }
177177
178178 pub fn owners_for_file ( & self , file_path : & str ) -> Result < Vec < FileOwner > , Error > {
179- use crate :: ownership:: for_file_fast :: find_file_owners;
179+ use crate :: ownership:: file_owner_resolver :: find_file_owners;
180180 let owners = find_file_owners ( & self . run_config . project_root , & self . config , std:: path:: Path :: new ( file_path) ) . map_err ( Error :: Io ) ?;
181181 Ok ( owners)
182182 }
@@ -215,10 +215,7 @@ impl Runner {
215215 pub fn for_file_codeowners_only ( & self , file_path : & str ) -> RunResult {
216216 match team_for_file_from_codeowners ( & self . run_config , file_path) {
217217 Ok ( Some ( team) ) => {
218- let relative_team_path = team
219- . path
220- . strip_prefix ( & self . run_config . project_root )
221- . unwrap_or ( team. path . as_path ( ) )
218+ let relative_team_path = crate :: path_utils:: relative_to ( & self . run_config . project_root , team. path . as_path ( ) )
222219 . to_string_lossy ( )
223220 . to_string ( ) ;
224221 RunResult {
You can’t perform that action at this time.
0 commit comments