Skip to content

Commit dbae3f5

Browse files
committed
printing path error
1 parent 1bf9386 commit dbae3f5

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/ownership.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use self::{
3333
pub struct Ownership {
3434
project: Arc<Project>,
3535
}
36-
36+
#[derive(Debug)]
3737
pub struct FileOwner {
3838
pub team: Team,
3939
pub team_config_file_path: String,

src/project.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,7 @@ impl Project {
178178
}
179179

180180
pub fn relative_path<'a>(&'a self, absolute_path: &'a Path) -> &'a Path {
181-
absolute_path
182-
.strip_prefix(&self.base_path)
183-
.expect("Could not generate relative path")
181+
absolute_path.strip_prefix(&self.base_path).unwrap_or(absolute_path)
184182
}
185183

186184
pub fn get_team(&self, name: &str) -> Option<Team> {

0 commit comments

Comments
 (0)