Fixes new tidy problems

This commit is contained in:
Sam Gibson 2015-08-23 10:48:53 +12:00
parent d53af0d9ed
commit 94284fc47f
2 changed files with 39 additions and 40 deletions

View file

@ -2,30 +2,32 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, NetworkEvent};
use hsts::secure_url;
use mime_classifier::MIMEClassifier;
use net_traits::ProgressMsg::{Payload, Done};
use net_traits::hosts::replace_hosts;
use net_traits::{ControlMsg, CookieSource, LoadData, Metadata, LoadConsumer, IncludeSubdomains};
use resource_task::{start_sending_opt, start_sending_sniffed_opt};
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, NetworkEvent};
use file_loader; use file_loader;
use std::collections::HashSet;
use flate2::read::{DeflateDecoder, GzDecoder}; use flate2::read::{DeflateDecoder, GzDecoder};
use hyper::header::{AcceptEncoding, Accept, ContentLength, ContentType, Host}; use hsts::secure_url;
use hyper::Error as HttpError;
use hyper::client::{Request, Response}; use hyper::client::{Request, Response};
use hyper::header::{AcceptEncoding, Accept, ContentLength, ContentType, Host};
use hyper::header::{Location, qitem, StrictTransportSecurity}; use hyper::header::{Location, qitem, StrictTransportSecurity};
use hyper::header::{Quality, QualityItem, Headers, ContentEncoding, Encoding}; use hyper::header::{Quality, QualityItem, Headers, ContentEncoding, Encoding};
use hyper::Error as HttpError;
use hyper::method::Method;
use hyper::http::RawStatus; use hyper::http::RawStatus;
use hyper::method::Method;
use hyper::mime::{Mime, TopLevel, SubLevel}; use hyper::mime::{Mime, TopLevel, SubLevel};
use hyper::net::{Fresh, HttpsConnector, Openssl}; use hyper::net::{Fresh, HttpsConnector, Openssl};
use hyper::status::{StatusCode, StatusClass}; use hyper::status::{StatusCode, StatusClass};
use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::ipc::{self, IpcSender};
use log; use log;
use mime_classifier::MIMEClassifier;
use net_traits::ProgressMsg::{Payload, Done};
use net_traits::hosts::replace_hosts;
use net_traits::{ControlMsg, CookieSource, LoadData, Metadata, LoadConsumer, IncludeSubdomains};
use openssl::ssl::{SslContext, SslMethod, SSL_VERIFY_PEER}; use openssl::ssl::{SslContext, SslMethod, SSL_VERIFY_PEER};
use resource_task::{start_sending_opt, start_sending_sniffed_opt};
use std::borrow::ToOwned;
use std::boxed::FnBox;
use std::collections::HashSet;
use std::error::Error; use std::error::Error;
use std::io::{self, Read, Write}; use std::io::{self, Read, Write};
use std::sync::Arc; use std::sync::Arc;
@ -33,9 +35,6 @@ use std::sync::mpsc::{Sender, channel};
use url::{Url, UrlParser}; use url::{Url, UrlParser};
use util::resource_files::resources_dir_path; use util::resource_files::resources_dir_path;
use util::task::spawn_named; use util::task::spawn_named;
use std::borrow::ToOwned;
use std::boxed::FnBox;
use uuid; use uuid;
pub fn factory(resource_mgr_chan: IpcSender<ControlMsg>, pub fn factory(resource_mgr_chan: IpcSender<ControlMsg>,

View file

@ -2,20 +2,20 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use flate2::Compression;
use flate2::write::{GzEncoder, DeflateEncoder};
use hyper::header::{Headers, Location, ContentLength};
use hyper::http::RawStatus;
use hyper::method::Method;
use hyper::status::StatusCode;
use ipc_channel::ipc;
use net::http_loader::{load, LoadError, HttpRequestFactory, HttpRequest, HttpResponse}; use net::http_loader::{load, LoadError, HttpRequestFactory, HttpRequest, HttpResponse};
use net::resource_task::new_resource_task; use net::resource_task::new_resource_task;
use net_traits::{ResourceTask, ControlMsg, CookieSource};
use url::Url;
use ipc_channel::ipc;
use net_traits::LoadData; use net_traits::LoadData;
use hyper::method::Method; use net_traits::{ResourceTask, ControlMsg, CookieSource};
use hyper::http::RawStatus;
use hyper::status::StatusCode;
use hyper::header::{Headers, Location, ContentLength};
use std::io::{self, Write, Read, Cursor};
use flate2::write::{GzEncoder, DeflateEncoder};
use flate2::Compression;
use std::borrow::Cow; use std::borrow::Cow;
use std::io::{self, Write, Read, Cursor};
use url::Url;
fn respond_with(body: Vec<u8>) -> MockResponse { fn respond_with(body: Vec<u8>) -> MockResponse {
let mut headers = Headers::new(); let mut headers = Headers::new();