diff --git a/Cargo.toml b/Cargo.toml index f861ae3..a363f2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "app_units" -version = "0.7.4" +version = "0.7.5" authors = ["The Servo Project Developers"] description = "Servo app units type (Au)" documentation = "https://docs.rs/app_units/" diff --git a/src/app_unit.rs b/src/app_unit.rs index ac43ecf..1729b9c 100644 --- a/src/app_unit.rs +++ b/src/app_unit.rs @@ -187,6 +187,12 @@ impl<'a> Sum<&'a Self> for Au { } } +impl<'a> Sum for Au { + fn sum>(iter: I) -> Self { + iter.fold(Self::zero(), |a, b| a + b) + } +} + impl Au { /// FIXME(pcwalton): Workaround for lack of cross crate inlining of newtype structs! #[inline]