Skip to content

Commit 081545f

Browse files
committed
refactor(package): simplify metadata path field report path join
`abs_path` and `workdir.join(rel_path)` are the same at that point.
1 parent 4c06c57 commit 081545f

File tree

1 file changed

+1
-6
lines changed
  • src/cargo/ops/cargo_package

1 file changed

+1
-6
lines changed

src/cargo/ops/cargo_package/vcs.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,7 @@ fn dirty_metadata_paths(pkg: &Package, repo: &git2::Repository) -> CargoResult<V
242242
if let Ok(rel_path) = paths::strip_prefix_canonical(&abs_path, workdir) {
243243
// Outside package root but under git workdir,
244244
if repo.status_file(&rel_path)? != git2::Status::CURRENT {
245-
dirty_files.push(if abs_path.is_symlink() {
246-
// For symlinks, shows paths to symlink sources
247-
workdir.join(rel_path)
248-
} else {
249-
abs_path
250-
});
245+
dirty_files.push(workdir.join(rel_path))
251246
}
252247
}
253248
}

0 commit comments

Comments
 (0)