(path: PathBuf)
| 181 | } |
| 182 | |
| 183 | fn normalize(path: PathBuf) -> Option<PathBuf> { |
| 184 | let mut result = PathBuf::new(); |
| 185 | for part in path.components() { |
| 186 | match part { |
| 187 | Component::Normal(name) => result.push(name), |
| 188 | Component::ParentDir if !result.pop() => return None, |
| 189 | Component::ParentDir | Component::CurDir => {} |
| 190 | _ => return None, |
| 191 | } |
| 192 | } |
| 193 | Some(result) |
| 194 | } |
| 195 | |
| 196 | impl SourceGraph { |
| 197 | /// Build from selected semantic facts and the full visible path inventory. |
no test coverage detected