Fix name collision

This commit is contained in:
Tangent 128 2018-04-02 20:10:50 -04:00
parent 719b11dd01
commit c6ab5e8e89

View file

@ -11,15 +11,15 @@ pub enum ParsingError<E> {
OtherError(E) OtherError(E)
} }
pub struct WebmStream<S> { pub struct WebmBuffer<S> {
stream: S, stream: S,
buffer: BytesMut, buffer: BytesMut,
last_read: usize last_read: usize
} }
impl<I: AsRef<[u8]>, S: Stream<Item = I>> WebmStream<S> { impl<I: AsRef<[u8]>, S: Stream<Item = I>> WebmBuffer<S> {
pub fn new(stream: S) -> Self { pub fn new(stream: S) -> Self {
WebmStream { WebmBuffer {
stream: stream, stream: stream,
buffer: BytesMut::new(), buffer: BytesMut::new(),
last_read: 0 last_read: 0
@ -71,11 +71,11 @@ impl<I: AsRef<[u8]>, S: Stream<Item = I>> WebmStream<S> {
} }
} }
impl<I: AsRef<[u8]>, S: Stream<Item = I>> WebmEventSource for WebmStream<S> { impl<I: AsRef<[u8]>, S: Stream<Item = I>> WebmEventSource for WebmBuffer<S> {
type Error = ParsingError<S::Error>; type Error = ParsingError<S::Error>;
fn poll_event<'a>(&'a mut self) -> Result<Async<Option<WebmElement<'a>>>, Self::Error> { fn poll_event<'a>(&'a mut self) -> Result<Async<Option<WebmElement<'a>>>, Self::Error> {
return WebmStream::poll_event(self); return WebmBuffer::poll_event(self);
} }
} }