Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

iter_copied rustc 1.35 compatibility fix #353 #354

Merged
merged 1 commit into from Nov 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/de.rs
Expand Up @@ -432,8 +432,7 @@ impl<'de, 'b> de::MapAccess<'de> for MapVisitor<'de, 'b> {
}
entries[start..]
.iter()
.copied()
.filter(|i| *i < self.max)
.filter_map(|i| if *i < self.max { Some(*i) } else { None })
.map(|i| (i, &self.tables[i]))
.find(|(_, table)| table.values.is_some())
.map(|p| p.0)
Expand Down Expand Up @@ -572,8 +571,7 @@ impl<'de, 'b> de::SeqAccess<'de> for MapVisitor<'de, 'b> {
}
entries[start..]
.iter()
.copied()
.filter(|i| *i < self.max)
.filter_map(|i| if *i < self.max { Some(*i) } else { None })
.map(|i| (i, &self.tables[i]))
.find(|(_, table)| table.array)
.map(|p| p.0)
Expand Down