Skip to main content

reintern_directives

Function reintern_directives 

Source
pub fn reintern_directives(directives: &mut [Spanned<Directive>]) -> usize
Expand description

Re-intern all strings in directives to deduplicate memory.

Walks through all directives and re-interns account names and currencies using a shared StringInterner, so identical strings share a single Arc<str> allocation. Returns the number of strings that were deduplicated (i.e., strings that were found to already exist in the interner).