Skip to main content

truncate_to_limit

Function truncate_to_limit 

Source
fn truncate_to_limit<T: Ord>(set: &mut BTreeSet<T>, limit: Option<usize>)
Expand description

Drops the last entries of set until it has at most limit, so memory and lookups stay bounded by the limit across all addresses, not just per address.