Fix typo in file categorizer panic message and show all dirs
@@ -231,7 +231,11 @@ impl<T: Clone> PathMapping<T> {
fn get(&self, path: &PathBuf) -> T {
self.find(path).unwrap_or_else(|| {
- panic!("Path `{:?}` not in of the the expected directories.", path);
+ panic!(
+ "Path '{:?}' not in any of the expected directories. Available directories: {:?}",
+ path,
+ self.0.iter().map(|(prefix, _)| prefix).collect::<Vec<_>>()
+ );
})
}
fn find(&self, path: &PathBuf) -> Option<T> {
