Implement IntoIterator for &GeneralNames

This commit is contained in:
Steven Fackler 2016-04-30 21:32:29 -07:00
parent 5c1c89b0e2
commit 87782b22cf
1 changed files with 9 additions and 0 deletions

View File

@ -819,6 +819,15 @@ impl<'a> GeneralNames<'a> {
} }
} }
impl<'a> IntoIterator for &'a GeneralNames<'a> {
type Item = GeneralName<'a>;
type IntoIter = GeneralNamesIter<'a>;
fn into_iter(self) -> GeneralNamesIter<'a> {
self.iter()
}
}
pub struct GeneralNamesIter<'a> { pub struct GeneralNamesIter<'a> {
names: &'a GeneralNames<'a>, names: &'a GeneralNames<'a>,
idx: usize, idx: usize,