cargo fix for Rust 2018
This commit is contained in:
parent
1c4ea2f3ed
commit
87eaed9c82
11 changed files with 26 additions and 26 deletions
|
@ -16,7 +16,7 @@ use futures::{
|
||||||
};
|
};
|
||||||
use odds::vec::VecExt;
|
use odds::vec::VecExt;
|
||||||
|
|
||||||
use chunk::Chunk;
|
use crate::chunk::Chunk;
|
||||||
|
|
||||||
pub enum Never {}
|
pub enum Never {}
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ use std::{
|
||||||
io::Cursor,
|
io::Cursor,
|
||||||
mem
|
mem
|
||||||
};
|
};
|
||||||
use ebml::EbmlEventSource;
|
use crate::ebml::EbmlEventSource;
|
||||||
use error::WebmetroError;
|
use crate::error::WebmetroError;
|
||||||
use webm::*;
|
use crate::webm::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct ClusterHead {
|
pub struct ClusterHead {
|
||||||
|
@ -281,7 +281,7 @@ impl<T: EbmlEventSource> WebmStream for T {}
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|
||||||
use chunk::*;
|
use crate::chunk::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn enough_space_for_header() {
|
fn enough_space_for_header() {
|
||||||
|
|
|
@ -305,11 +305,11 @@ pub trait EbmlEventSource {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use bytes::{BytesMut};
|
use bytes::{BytesMut};
|
||||||
use ebml::*;
|
use crate::ebml::*;
|
||||||
use ebml::EbmlError::{CorruptVarint, UnknownElementId};
|
use crate::ebml::EbmlError::{CorruptVarint, UnknownElementId};
|
||||||
use ebml::Varint::{Unknown, Value};
|
use crate::ebml::Varint::{Unknown, Value};
|
||||||
use std::io::Cursor;
|
use std::io::Cursor;
|
||||||
use tests::TEST_FILE;
|
use crate::tests::TEST_FILE;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn fail_corrupted_varints() {
|
fn fail_corrupted_varints() {
|
||||||
|
|
|
@ -8,7 +8,7 @@ use std::{
|
||||||
io::Error as IoError
|
io::Error as IoError
|
||||||
};
|
};
|
||||||
|
|
||||||
use ebml::EbmlError;
|
use crate::ebml::EbmlError;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum WebmetroError {
|
pub enum WebmetroError {
|
||||||
|
|
|
@ -3,8 +3,8 @@ use std::time::{Duration, Instant};
|
||||||
use futures::prelude::*;
|
use futures::prelude::*;
|
||||||
use tokio::timer::Delay;
|
use tokio::timer::Delay;
|
||||||
|
|
||||||
use chunk::Chunk;
|
use crate::chunk::Chunk;
|
||||||
use error::WebmetroError;
|
use crate::error::WebmetroError;
|
||||||
|
|
||||||
pub struct ChunkTimecodeFixer<S> {
|
pub struct ChunkTimecodeFixer<S> {
|
||||||
stream: S,
|
stream: S,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
use ebml::FromEbml;
|
use crate::ebml::FromEbml;
|
||||||
|
|
||||||
pub struct EbmlIterator<'a, T: FromEbml<'a>>(&'a [u8], PhantomData<fn() -> T>);
|
pub struct EbmlIterator<'a, T: FromEbml<'a>>(&'a [u8], PhantomData<fn() -> T>);
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ pub mod webm;
|
||||||
|
|
||||||
pub mod channel;
|
pub mod channel;
|
||||||
|
|
||||||
pub use ebml::{EbmlError, FromEbml};
|
pub use crate::ebml::{EbmlError, FromEbml};
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|
|
@ -14,7 +14,7 @@ mod commands;
|
||||||
|
|
||||||
use clap::{App, AppSettings};
|
use clap::{App, AppSettings};
|
||||||
|
|
||||||
use commands::{
|
use crate::commands::{
|
||||||
relay,
|
relay,
|
||||||
filter,
|
filter,
|
||||||
send,
|
send,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
use futures::Async;
|
use futures::Async;
|
||||||
|
|
||||||
use ebml::EbmlError;
|
use crate::ebml::EbmlError;
|
||||||
use ebml::EbmlEventSource;
|
use crate::ebml::EbmlEventSource;
|
||||||
use ebml::FromEbml;
|
use crate::ebml::FromEbml;
|
||||||
|
|
||||||
pub struct EbmlSlice<'a>(pub &'a [u8]);
|
pub struct EbmlSlice<'a>(pub &'a [u8]);
|
||||||
|
|
||||||
|
|
|
@ -8,11 +8,11 @@ use futures::{
|
||||||
stream::Stream
|
stream::Stream
|
||||||
};
|
};
|
||||||
|
|
||||||
use ebml::{
|
use crate::ebml::{
|
||||||
EbmlEventSource,
|
EbmlEventSource,
|
||||||
FromEbml
|
FromEbml
|
||||||
};
|
};
|
||||||
use error::WebmetroError;
|
use crate::error::WebmetroError;
|
||||||
|
|
||||||
pub struct EbmlStreamingParser<S> {
|
pub struct EbmlStreamingParser<S> {
|
||||||
stream: S,
|
stream: S,
|
||||||
|
@ -79,7 +79,7 @@ impl<I: Buf, S: Stream<Item = I, Error = WebmetroError>> EbmlStreamingParser<S>
|
||||||
self.buffer.put(buf);
|
self.buffer.put(buf);
|
||||||
// ok can retry decoding now
|
// ok can retry decoding now
|
||||||
},
|
},
|
||||||
other => return other.map(|async| async.map(|_| None))
|
other => return other.map(|async_status| async_status.map(|_| None))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
10
src/webm.rs
10
src/webm.rs
|
@ -1,8 +1,8 @@
|
||||||
use std::io::{Cursor, Error as IoError, ErrorKind, Result as IoResult, Write, Seek};
|
use std::io::{Cursor, Error as IoError, ErrorKind, Result as IoResult, Write, Seek};
|
||||||
use bytes::{BigEndian, BufMut, ByteOrder};
|
use bytes::{BigEndian, BufMut, ByteOrder};
|
||||||
use ebml::*;
|
use crate::ebml::*;
|
||||||
use iterator::ebml_iter;
|
use crate::iterator::ebml_iter;
|
||||||
use iterator::EbmlIterator;
|
use crate::iterator::EbmlIterator;
|
||||||
|
|
||||||
const SEGMENT_ID: u64 = 0x08538067;
|
const SEGMENT_ID: u64 = 0x08538067;
|
||||||
const SEEK_HEAD_ID: u64 = 0x014D9B74;
|
const SEEK_HEAD_ID: u64 = 0x014D9B74;
|
||||||
|
@ -131,11 +131,11 @@ pub fn encode_webm_element<T: Write + Seek>(element: WebmElement, output: &mut T
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use tests::{
|
use crate::tests::{
|
||||||
TEST_FILE,
|
TEST_FILE,
|
||||||
ENCODE_WEBM_TEST_FILE
|
ENCODE_WEBM_TEST_FILE
|
||||||
};
|
};
|
||||||
use webm::*;
|
use crate::webm::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn decode_webm_test1() {
|
fn decode_webm_test1() {
|
||||||
|
|
Loading…
Reference in a new issue