We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Sum
Au
1 parent a5bf3ba commit 190ea4fCopy full SHA for 190ea4f
Cargo.toml
@@ -1,6 +1,6 @@
1
[package]
2
name = "app_units"
3
-version = "0.7.4"
+version = "0.7.5"
4
authors = ["The Servo Project Developers"]
5
description = "Servo app units type (Au)"
6
documentation = "https://docs.rs/app_units/"
src/app_unit.rs
@@ -187,6 +187,12 @@ impl<'a> Sum<&'a Self> for Au {
187
}
188
189
190
+impl<'a> Sum<Self> for Au {
191
+ fn sum<I: Iterator<Item = Self>>(iter: I) -> Self {
192
+ iter.fold(Self::zero(), |a, b| a + b)
193
+ }
194
+}
195
+
196
impl Au {
197
/// FIXME(pcwalton): Workaround for lack of cross crate inlining of newtype structs!
198
#[inline]
0 commit comments