(datums: I)
| 174 | } |
| 175 | |
| 176 | fn sum_numeric<'a, I>(datums: I) -> Datum<'a> |
| 177 | where |
| 178 | I: IntoIterator<Item = Datum<'a>>, |
| 179 | { |
| 180 | let mut cx = numeric::cx_datum(); |
| 181 | let mut sum = Numeric::zero(); |
| 182 | let mut empty = true; |
| 183 | for d in datums { |
| 184 | if !d.is_null() { |
| 185 | empty = false; |
| 186 | cx.add(&mut sum, &d.unwrap_numeric().0); |
| 187 | } |
| 188 | } |
| 189 | match empty { |
| 190 | true => Datum::Null, |
| 191 | false => Datum::from(sum), |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | fn count<'a, I>(datums: I) -> Datum<'a> |
| 196 | where |
no test coverage detected