diff --git a/juniper/CHANGELOG.md b/juniper/CHANGELOG.md index 42e545969..93356570d 100644 --- a/juniper/CHANGELOG.md +++ b/juniper/CHANGELOG.md @@ -6,6 +6,9 @@ The DirectiveLocation::InlineFragment had an invalid literal value, which broke third party tools like apollo cli. - Added GraphQL Playground integration + The DirectiveLocation::InlineFragment had an invalid literal value, + which broke third party tools like apollo cli. +- The return type of `value::object::Object::iter/iter_mut` has changed to `impl Iter` [#312](https://github.com/graphql-rust/juniper/pull/312) # [0.11.1] 2018-12-19 diff --git a/juniper/src/value/object.rs b/juniper/src/value/object.rs index 2a2985655..c617378b5 100644 --- a/juniper/src/value/object.rs +++ b/juniper/src/value/object.rs @@ -49,22 +49,14 @@ impl<S> Object<S> { } /// Get a iterator over all field value pairs - /// - /// This method returns a iterator over `&'a (String, Value)` - // TODO: change this to `-> impl Iterator<Item = &(String, Value)>` - // as soon as juniper bumps the minimal supported rust verion to 1.26 - pub fn iter(&self) -> FieldIter<S> { + pub fn iter(&self) -> impl Iterator<Item = &(String, Value<S>)> { FieldIter { inner: self.key_value_list.iter(), } } /// Get a iterator over all mutable field value pairs - /// - /// This method returns a iterator over `&mut 'a (String, Value)` - // TODO: change this to `-> impl Iterator<Item = &mut (String, Value)>` - // as soon as juniper bumps the minimal supported rust verion to 1.26 - pub fn iter_mut(&mut self) -> FieldIterMut<S> { + pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut (String, Value<S>)> { FieldIterMut { inner: self.key_value_list.iter_mut(), }