mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Extract common fields out of ProjectWorkspace variants
This commit is contained in:
parent
a2ed6837bc
commit
ff56cb6e49
15 changed files with 248 additions and 333 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue