Clean up calls to into_iter per into_iter_on_ref lint

This commit is contained in:
David Tolnay 2018-11-10 20:10:37 -08:00
parent 820107d15e
commit 451ee2d78e
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 7 additions and 7 deletions

View File

@ -1763,7 +1763,7 @@ mod content {
V: Visitor<'de>,
E: de::Error,
{
let seq = content.into_iter().map(ContentRefDeserializer::new);
let seq = content.iter().map(ContentRefDeserializer::new);
let mut seq_visitor = de::value::SeqDeserializer::new(seq);
let value = try!(visitor.visit_seq(&mut seq_visitor));
try!(seq_visitor.end());
@ -1778,7 +1778,7 @@ mod content {
V: Visitor<'de>,
E: de::Error,
{
let map = content.into_iter().map(|&(ref k, ref v)| {
let map = content.iter().map(|&(ref k, ref v)| {
(
ContentRefDeserializer::new(k),
ContentRefDeserializer::new(v),
@ -2085,7 +2085,7 @@ mod content {
{
let (variant, value) = match *self.content {
Content::Map(ref value) => {
let mut iter = value.into_iter();
let mut iter = value.iter();
let &(ref variant, ref value) = match iter.next() {
Some(v) => v,
None => {
@ -2272,9 +2272,9 @@ mod content {
where
E: de::Error,
{
fn new(vec: &'a [Content<'de>]) -> Self {
fn new(slice: &'a [Content<'de>]) -> Self {
SeqRefDeserializer {
iter: vec.into_iter(),
iter: slice.iter(),
err: PhantomData,
}
}
@ -2350,7 +2350,7 @@ mod content {
{
fn new(map: &'a [(Content<'de>, Content<'de>)]) -> Self {
MapRefDeserializer {
iter: map.into_iter(),
iter: map.iter(),
value: None,
err: PhantomData,
}

View File

@ -45,7 +45,7 @@ pub fn with_where_predicates(
generics
.make_where_clause()
.predicates
.extend(predicates.into_iter().cloned());
.extend(predicates.iter().cloned());
generics
}