Extract common fields out of ProjectWorkspace variants

This commit is contained in:
Lukas Wirth 2024-04-21 17:03:02 +02:00
parent a2ed6837bc
commit ff56cb6e49
15 changed files with 248 additions and 333 deletions

View file

@ -38,6 +38,10 @@ impl ManifestPath {
pub fn canonicalize(&self) -> ! {
(**self).canonicalize()
}
pub fn is_rust_manifest(&self) -> bool {
self.file.extension().map_or(false, |ext| ext == "rs")
}
}
impl fmt::Display for ManifestPath {