Remove unused module
This commit is contained in:
parent
8a3f478c38
commit
ccbb566d85
2 changed files with 0 additions and 19 deletions
|
@ -2,7 +2,6 @@
|
|||
pub mod ebml;
|
||||
pub mod error;
|
||||
pub mod iterator;
|
||||
pub mod slice;
|
||||
pub mod stream_parser;
|
||||
|
||||
pub mod chunk;
|
||||
|
|
18
src/slice.rs
18
src/slice.rs
|
@ -1,18 +0,0 @@
|
|||
use futures::Async;
|
||||
|
||||
use crate::ebml::EbmlError;
|
||||
use crate::ebml::EbmlEventSource;
|
||||
use crate::ebml::FromEbml;
|
||||
|
||||
pub struct EbmlSlice<'a>(pub &'a [u8]);
|
||||
|
||||
impl<'b> EbmlEventSource for EbmlSlice<'b> {
|
||||
type Error = EbmlError;
|
||||
|
||||
fn poll_event<'a, T: FromEbml<'a>>(&'a mut self) -> Result<Async<Option<T>>, EbmlError> {
|
||||
T::decode_element(self.0).map(|option| option.map(|(element, element_size)| {
|
||||
self.0 = &self.0[element_size..];
|
||||
element
|
||||
})).map(Async::Ready)
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue