Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust/rubydex-sys/src/graph_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ mod tests {
indexer.index();

let mut graph = Graph::new();
graph.update(indexer.local_graph());
graph.consume_document_changes(indexer.local_graph());
let mut resolver = Resolver::new(&mut graph);
resolver.resolve_all();

Expand Down
4 changes: 2 additions & 2 deletions rust/rubydex/src/indexing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl Job for IndexingJob {
/// Indexes a single source string in memory, dispatching to the appropriate indexer based on `language_id`.
pub fn index_source(graph: &mut Graph, uri: &str, source: &str, language_id: &LanguageId) {
let local_graph = build_local_graph(uri.to_string(), source, language_id);
graph.update(local_graph);
graph.consume_document_changes(local_graph);
}

/// Indexes the given paths, reading the content from disk and populating the given `Graph` instance.
Expand All @@ -122,7 +122,7 @@ pub fn index_files(graph: &mut Graph, paths: Vec<PathBuf>) -> Vec<Errors> {
JobQueue::run(&queue);

while let Ok(local_graph) = local_graphs_rx.recv() {
graph.update(local_graph);
graph.consume_document_changes(local_graph);
}

errors_rx.iter().collect()
Expand Down
4 changes: 4 additions & 0 deletions rust/rubydex/src/model/declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ impl Namespace {
all_namespaces!(self, it => it.member(str_id))
}

pub fn remove_member(&mut self, str_id: &StringId) -> Option<DeclarationId> {
all_namespaces!(self, it => it.remove_member(str_id))
}

#[must_use]
pub fn singleton_class(&self) -> Option<&DeclarationId> {
all_namespaces!(self, it => it.singleton_class_id())
Expand Down
Loading
Loading