pub fn optimize(ideal_filters: &mut [Filter], max_filters: usize) -> &[Filter]
Expand description

Combines a slice of ideal filters down to max_filters filters that will accept a superset of the message IDs of the ideal filters

The returned slice will be a sub-slice of ideal_filters.

If max_filters is zero, this function returns an empty slice. If max_filters is greater than the length of ideal_filters, this function returns ideal_filters.