Implement IntoIterator for &GeneralNames
This commit is contained in:
parent
5c1c89b0e2
commit
87782b22cf
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue