We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbba833 commit 7825cafCopy full SHA for 7825caf
src/lib.rs
@@ -195,8 +195,9 @@ pub fn is_dependency_tree_root<'a>(manifest: &'a Manifest, locator: &'a PackageL
195
}
196
197
pub fn find_locator<'a>(manifest: &'a Manifest, path: &Path) -> Option<&'a PackageLocator> {
198
- let rel_path = pathdiff::diff_paths(path, &manifest.manifest_dir)
199
- .expect("Assertion failed: Provided path should be absolute");
+ let rel_path = pathdiff::diff_paths(path, &manifest.manifest_dir).unwrap_or_else(|| {
+ panic!("Assertion failed: Provided path should be absolute but received {}", path.display())
200
+ });
201
202
if let Some(regex) = &manifest.ignore_pattern_data {
203
if regex.0.is_match(&util::normalize_path(rel_path.to_string_lossy())).unwrap() {
0 commit comments