Skip to main content

class_hover_from_workspace_index

Function class_hover_from_workspace_index 

Source
pub fn class_hover_from_workspace_index(
    word: &str,
    fqn: Option<&str>,
    wi: &WorkspaceIndexData,
) -> Option<Hover>
Expand description

O(1) variant of class_hover_from_index: resolves word/fqn via WorkspaceIndexData::resolve_class_ref first, falling back to the full linear scan only when the index doesn’t resolve the class — preserves every edge case the scan covers (e.g. names the aggregate’s short-name map doesn’t disambiguate the same way), just skips the common-case cost.