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 chunk::Chunk;
|
||||
use crate::chunk::Chunk;
|
||||
|
||||
pub enum Never {}
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ use std::{
|
|||
io::Cursor,
|
||||
mem
|
||||
};
|
||||
use ebml::EbmlEventSource;
|
||||
use error::WebmetroError;
|
||||
use webm::*;
|
||||
use crate::ebml::EbmlEventSource;
|
||||
use crate::error::WebmetroError;
|
||||
use crate::webm::*;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct ClusterHead {
|
||||
|
@ -281,7 +281,7 @@ impl<T: EbmlEventSource> WebmStream for T {}
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
use chunk::*;
|
||||
use crate::chunk::*;
|
||||
|
||||
#[test]
|
||||
fn enough_space_for_header() {
|
||||
|
|
|
@ -305,11 +305,11 @@ pub trait EbmlEventSource {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use bytes::{BytesMut};
|
||||
use ebml::*;
|
||||
use ebml::EbmlError::{CorruptVarint, UnknownElementId};
|
||||
use ebml::Varint::{Unknown, Value};
|
||||
use crate::ebml::*;
|
||||
use crate::ebml::EbmlError::{CorruptVarint, UnknownElementId};
|
||||
use crate::ebml::Varint::{Unknown, Value};
|
||||
use std::io::Cursor;
|
||||
use tests::TEST_FILE;
|
||||
use crate::tests::TEST_FILE;
|
||||
|
||||
#[test]
|
||||
fn fail_corrupted_varints() {
|
||||
|
|
|
@ -8,7 +8,7 @@ use std::{
|
|||
io::Error as IoError
|
||||
};
|
||||
|
||||
use ebml::EbmlError;
|
||||
use crate::ebml::EbmlError;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum WebmetroError {
|
||||
|
|
|
@ -3,8 +3,8 @@ use std::time::{Duration, Instant};
|
|||
use futures::prelude::*;
|
||||
use tokio::timer::Delay;
|
||||
|
||||
use chunk::Chunk;
|
||||
use error::WebmetroError;
|
||||
use crate::chunk::Chunk;
|
||||
use crate::error::WebmetroError;
|
||||
|
||||
pub struct ChunkTimecodeFixer<S> {
|
||||
stream: S,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::marker::PhantomData;
|
||||
|
||||
use ebml::FromEbml;
|
||||
use crate::ebml::FromEbml;
|
||||
|
||||
pub struct EbmlIterator<'a, T: FromEbml<'a>>(&'a [u8], PhantomData<fn() -> T>);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ pub mod webm;
|
|||
|
||||
pub mod channel;
|
||||
|
||||
pub use ebml::{EbmlError, FromEbml};
|
||||
pub use crate::ebml::{EbmlError, FromEbml};
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
|
|
@ -14,7 +14,7 @@ mod commands;
|
|||
|
||||
use clap::{App, AppSettings};
|
||||
|
||||
use commands::{
|
||||
use crate::commands::{
|
||||
relay,
|
||||
filter,
|
||||
send,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use futures::Async;
|
||||
|
||||
use ebml::EbmlError;
|
||||
use ebml::EbmlEventSource;
|
||||
use ebml::FromEbml;
|
||||
use crate::ebml::EbmlError;
|
||||
use crate::ebml::EbmlEventSource;
|
||||
use crate::ebml::FromEbml;
|
||||
|
||||
pub struct EbmlSlice<'a>(pub &'a [u8]);
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@ use futures::{
|
|||
stream::Stream
|
||||
};
|
||||
|
||||
use ebml::{
|
||||
use crate::ebml::{
|
||||
EbmlEventSource,
|
||||
FromEbml
|
||||
};
|
||||
use error::WebmetroError;
|
||||
use crate::error::WebmetroError;
|
||||
|
||||
pub struct EbmlStreamingParser<S> {
|
||||
stream: S,
|
||||
|
@ -79,7 +79,7 @@ impl<I: Buf, S: Stream<Item = I, Error = WebmetroError>> EbmlStreamingParser<S>
|
|||
self.buffer.put(buf);
|
||||
// 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 bytes::{BigEndian, BufMut, ByteOrder};
|
||||
use ebml::*;
|
||||
use iterator::ebml_iter;
|
||||
use iterator::EbmlIterator;
|
||||
use crate::ebml::*;
|
||||
use crate::iterator::ebml_iter;
|
||||
use crate::iterator::EbmlIterator;
|
||||
|
||||
const SEGMENT_ID: u64 = 0x08538067;
|
||||
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)]
|
||||
mod tests {
|
||||
use tests::{
|
||||
use crate::tests::{
|
||||
TEST_FILE,
|
||||
ENCODE_WEBM_TEST_FILE
|
||||
};
|
||||
use webm::*;
|
||||
use crate::webm::*;
|
||||
|
||||
#[test]
|
||||
fn decode_webm_test1() {
|
||||
|
|
Loading…
Reference in a new issue