hide empty changes

This commit is contained in:
Aleksey Kladov 2018-12-21 19:13:26 +03:00
parent 9de3a45be6
commit e086cc8db5
2 changed files with 20 additions and 7 deletions

View file

@ -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
}