remove unnecessary double-colons

This commit is contained in:
Daniel Eades
2019-08-16 19:54:09 +01:00
committed by Sean McArthur
parent 06353fbb1a
commit 4bb4149b63
12 changed files with 70 additions and 70 deletions

View File

@@ -48,7 +48,7 @@ impl Body {
#[inline]
pub(crate) fn empty() -> Body {
Body::wrap(::hyper::Body::empty())
Body::wrap(hyper::Body::empty())
}
#[inline]
@@ -145,7 +145,7 @@ where
{
#[inline]
fn from(s: Box<dyn Stream<Item = I, Error = E> + Send>) -> Body {
Body::wrap(::hyper::Body::wrap_stream(s))
Body::wrap(hyper::Body::wrap_stream(s))
}
}
@@ -204,7 +204,7 @@ impl Extend<u8> for Chunk {
impl IntoIterator for Chunk {
type Item = u8;
//XXX: exposing type from hyper!
type IntoIter = <::hyper::Chunk as IntoIterator>::IntoIter;
type IntoIter = <hyper::Chunk as IntoIterator>::IntoIter;
fn into_iter(self) -> Self::IntoIter {
self.inner.into_iter()
}

View File

@@ -481,7 +481,7 @@ mod tests {
.part("key1", Part::text("value1"))
.part(
"key2",
Part::text("value2").mime(::mime::IMAGE_BMP),
Part::text("value2").mime(mime::IMAGE_BMP),
)
.part("reader2", Part::stream(futures::stream::once::<_, hyper::Error>(Ok(hyper::Chunk::from("part2".to_owned())))))
.part(
@@ -515,12 +515,12 @@ mod tests {
std::str::from_utf8(&out).unwrap()
);
println!("START EXPECTED\n{}\nEND EXPECTED", expected);
assert_eq!(::std::str::from_utf8(&out).unwrap(), expected);
assert_eq!(std::str::from_utf8(&out).unwrap(), expected);
}
#[test]
fn stream_to_end_with_header() {
let mut part = Part::text("value2").mime(::mime::IMAGE_BMP);
let mut part = Part::text("value2").mime(mime::IMAGE_BMP);
part.meta.headers.insert("Hdr3", "/a/b/c".parse().unwrap());
let mut form = Form::new().part("key2", part);
form.inner.boundary = "boundary".to_string();

View File

@@ -37,7 +37,7 @@ pub struct Response {
}
impl Response {
pub(super) fn new(res: hyper::Response<::hyper::Body>, url: Url, gzip: bool, timeout: Option<Delay>) -> Response {
pub(super) fn new(res: hyper::Response<hyper::Body>, url: Url, gzip: bool, timeout: Option<Delay>) -> Response {
let (parts, body) = res.into_parts();
let status = parts.status;
let version = parts.version;