mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
hide empty changes
This commit is contained in:
parent
9de3a45be6
commit
e086cc8db5
2 changed files with 20 additions and 7 deletions
|
@ -98,6 +98,9 @@ impl CrateGraph {
|
|||
pub fn add_dep(&mut self, from: CrateId, name: SmolStr, to: CrateId) {
|
||||
self.arena.get_mut(&from).unwrap().add_dep(name, to)
|
||||
}
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.arena.is_empty()
|
||||
}
|
||||
pub fn crate_root(&self, crate_id: CrateId) -> FileId {
|
||||
self.arena[&crate_id].file_id
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue