diff --git a/src/graph/builder.rs b/src/graph/builder.rs index f5f64c6..48f3368 100644 --- a/src/graph/builder.rs +++ b/src/graph/builder.rs @@ -24,6 +24,7 @@ pub struct Options {} #[derive(Debug)] pub struct Builder<'a> { + #[allow(dead_code)] options: Options, db: &'a RootDatabase, vfs: &'a Vfs, diff --git a/src/graph/edge.rs b/src/graph/edge.rs index fd0d8d3..30d5a0b 100644 --- a/src/graph/edge.rs +++ b/src/graph/edge.rs @@ -33,24 +33,3 @@ impl fmt::Display for EdgeKind { pub struct Edge { pub kind: EdgeKind, } - -impl Edge { - pub fn merge_with(&mut self, other: &Edge) { - match (self.kind, other.kind) { - (EdgeKind::Uses, EdgeKind::Uses) => { - self.kind = EdgeKind::Uses; - } - (EdgeKind::Uses, EdgeKind::Owns) - | (EdgeKind::Owns, EdgeKind::Uses) - | (EdgeKind::Owns, EdgeKind::Owns) => { - self.kind = EdgeKind::Owns; - } - } - } - - pub fn merged_with(&self, other: &Edge) -> Self { - let mut clone = self.clone(); - clone.merge_with(other); - clone - } -} diff --git a/src/graph/node.rs b/src/graph/node.rs index 4b3b2c6..0886445 100644 --- a/src/graph/node.rs +++ b/src/graph/node.rs @@ -16,18 +16,10 @@ impl Node { Self { item } } - pub fn display_name(&self) -> String { - self.item.display_name() - } - pub fn display_path(&self) -> String { self.item.display_path() } - pub fn crate_display_name(&self) -> String { - self.item.crate_display_name() - } - pub fn kind_display_name(&self, db: &RootDatabase) -> Option { self.item.kind_display_name(db) } diff --git a/src/item.rs b/src/item.rs index b1aba25..245915b 100644 --- a/src/item.rs +++ b/src/item.rs @@ -85,13 +85,6 @@ impl Item { self.path.join("::") } - pub fn crate_display_name(&self) -> String { - self.path - .first() - .expect("Expected path with at least one component") - .clone() - } - pub fn kind_display_name(&self, db: &RootDatabase) -> Option { let Some(module_def) = self.hir else { return None;