Skip to main content

get_total_weight

Function get_total_weight 

Source
pub fn get_total_weight<T>(items: &[T], weight: impl Fn(&T) -> i32) -> i32
Expand description

Sums weight over items.

ยงPanics

Panics if the sum exceeds i32::MAX.