Skip to main content

cached_to_module_opts

Function cached_to_module_opts 

Source
pub fn cached_to_module_opts(
    cached: &CachedModule,
    file_id: FileId,
    need_complexity: bool,
) -> ModuleInfo
Expand description

Reconstruct a ModuleInfo from a CachedModule, skipping the per-function complexity vec when need_complexity is false. Avoids the Vec<FunctionComplexity> clone on warm runs of commands (e.g. fallow check) that don’t consume complexity, which adds up across tens of thousands of files.