From efe708ca6bd614c392dc7831dd9f471f9acbfc94 Mon Sep 17 00:00:00 2001 From: Tangent 128 Date: Sun, 16 Apr 2017 16:24:15 -0400 Subject: [PATCH] Make Ebml struct generic over source type --- src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index bd5fd09..8e46682 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -128,9 +128,10 @@ pub trait Schema<'a> { } -pub struct Ebml<'b, S: Schema<'b>>(S, &'b[u8]); +#[derive(Debug, PartialEq)] +pub struct Ebml<'b, S: Schema<'b>, T: 'b>(S, &'b T); -impl<'b, S: Schema<'b>> IntoIterator for Ebml<'b, S> { +impl<'b, S: Schema<'b>> IntoIterator for Ebml<'b, S, &'b[u8]> { type Item = S::Element; type IntoIter = EbmlIterator<'b, S>;