From e086cc8db5edbf38756abca25c8bcc3334a596ff Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 21 Dec 2018 19:13:26 +0300 Subject: hide empty changes --- crates/ra_db/src/input.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ra_db') diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index f12dd9345..ead8dfe48 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs @@ -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 } -- cgit v1.2.3