/// Filters the given `MetricVec`, retaining only metrics with non-zero values.
Filters the given `MetricVec`, retaining only metrics with non-zero values.
Filters the given ` MetricVec ` retaining only metrics with non - zero values .
pub fn nonzero_values<V: From<u8> + PartialEq<V> + Copy>(metrics: MetricVec<V>) -> MetricVec<V> {
    metrics
        .into_iter()
        .filter(|(_, value)| value != &V::from(0))
        .collect()
}
pub fn nonzero_values < V : From < u8 > + PartialEq < V > + Copy > ( metrics : MetricVec < V > ) -> MetricVec < V > { metrics . into_iter ( ) . filter ( | ( _ , value ) | value != & V :: from ( 0 ) ) . collect ( ) }
Filters the given `MetricVec`, retaining only metrics with non-zero values.
Filters the given ` MetricVec ` retaining only metrics with non - zero values .
metrics
MetricVec<V>