Remove unused imports and needless borrows

This commit is contained in:
David Tolnay 2016-05-13 10:47:09 -07:00
parent 74eb2f52b8
commit 004dcaec3b
5 changed files with 6 additions and 10 deletions

View File

@ -41,7 +41,7 @@ impl<'a> From<&'a [u8]> for Bytes<'a> {
impl<'a> From<&'a Vec<u8>> for Bytes<'a> {
fn from(bytes: &'a Vec<u8>) -> Self {
Bytes {
bytes: &bytes,
bytes: bytes,
}
}
}
@ -165,7 +165,7 @@ mod bytebuf {
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error>
where S: ser::Serializer
{
serializer.serialize_bytes(&self)
serializer.serialize_bytes(self)
}
}

View File

@ -9,7 +9,6 @@ use syntax::ast::{
};
use syntax::codemap::Span;
use syntax::ext::base::{Annotatable, ExtCtxt};
use syntax::ext::build::AstBuilder;
use syntax::parse::token::InternedString;
use syntax::ptr::P;

View File

@ -1,9 +1,9 @@
use test::Bencher;
use std::error;
use std::fmt;
use rustc_serialize::{Decoder, Decodable};
use rustc_serialize::Decodable;
use serde;
use serde::de::{Deserializer, Deserialize};
use serde::de::Deserialize;
//////////////////////////////////////////////////////////////////////////////

View File

@ -3,10 +3,10 @@ use test::Bencher;
use std::fmt;
use std::error;
use rustc_serialize::{Decoder, Decodable};
use rustc_serialize::Decodable;
use serde;
use serde::de::{Deserializer, Deserialize};
use serde::de::Deserialize;
//////////////////////////////////////////////////////////////////////////////

View File

@ -2,9 +2,6 @@ use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
use std::net;
use std::path::PathBuf;
extern crate serde;
use self::serde::de::Deserializer;
use token::{
Error,
Token,