(path: &Path)
| 366 | } |
| 367 | |
| 368 | fn normalize_lexically(path: &Path) -> PathBuf { |
| 369 | let mut normalized = PathBuf::new(); |
| 370 | for component in path.components() { |
| 371 | match component { |
| 372 | Component::CurDir => {} |
| 373 | Component::ParentDir => { |
| 374 | normalized.pop(); |
| 375 | } |
| 376 | other => normalized.push(other.as_os_str()), |
| 377 | } |
| 378 | } |
| 379 | normalized |
| 380 | } |
| 381 | |
| 382 | pub(super) fn paths_same(a: &Path, b: &Path) -> bool { |
| 383 | match (a.canonicalize(), b.canonicalize()) { |
no test coverage detected