armanriazi•rust•error•E0308•mismatched types expected type parameter ``, found associated type
//Resolve IntoIterator<Item=S>
fn sum_list<I,S>(l:I,mut s:S)->S
where I: IntoIterator,
S: AddAssign,
{
let mut it = l.into_iter();
while let Some(n) = it.next(){
s +=n //Error rised
}
s
}