Skip to content

Commit 67e6eb8

Browse files
committed
pem: use SliceIter constructor
1 parent c008654 commit 67e6eb8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/pem.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ pub trait PemObject: Sized {
2727
/// Iterate over all sections of this type from PEM contained in
2828
/// a byte slice.
2929
fn pem_slice_iter(pem: &[u8]) -> SliceIter<'_, Self> {
30-
SliceIter {
31-
current: pem,
32-
_ty: PhantomData,
33-
}
30+
SliceIter::new(pem)
3431
}
3532

3633
/// Decode the first section of this type from the PEM contents of the named file.

0 commit comments

Comments
 (0)