mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Auto merge of #7265 - tafia:tidy-use, r=Ms2ger
Add alphabetical order check for use statements close #7112 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7265) <!-- Reviewable:end -->
This commit is contained in:
commit
a5fbb2f2a6
270 changed files with 919 additions and 933 deletions
2
tests/reftest.rs
vendored
2
tests/reftest.rs
vendored
|
@ -26,8 +26,8 @@ use std::fs::{PathExt, File, walk_dir};
|
|||
use std::io::{self, Read, Result};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::{Command, Stdio};
|
||||
use test::{AutoColor, DynTestName, DynTestFn, TestDesc, TestOpts, TestDescAndFn, ShouldPanic};
|
||||
use test::run_tests_console;
|
||||
use test::{AutoColor, DynTestName, DynTestFn, TestDesc, TestOpts, TestDescAndFn, ShouldPanic};
|
||||
use url::Url;
|
||||
|
||||
bitflags!(
|
||||
|
|
|
@ -16,9 +16,9 @@ fn assert_parse(url: &'static str,
|
|||
content_type: Option<ContentType>,
|
||||
charset: Option<String>,
|
||||
data: Option<Vec<u8>>) {
|
||||
use net::data_loader::load;
|
||||
use std::sync::mpsc::channel;
|
||||
use url::Url;
|
||||
use net::data_loader::load;
|
||||
|
||||
let (start_chan, start_port) = ipc::channel().unwrap();
|
||||
load(LoadData::new(Url::parse(url).unwrap(), None), Channel(start_chan));
|
||||
|
|
|
@ -2,15 +2,14 @@
|
|||
* 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/. */
|
||||
|
||||
use net::hsts::HSTSList;
|
||||
use net::hsts::HSTSEntry;
|
||||
use net_traits::IncludeSubdomains;
|
||||
use ipc_channel::ipc;
|
||||
use net::hsts::{HSTSList, HSTSEntry};
|
||||
use net::hsts::{secure_url, preload_hsts_domains};
|
||||
use net::resource_task::ResourceManager;
|
||||
use ipc_channel::ipc;
|
||||
use net_traits::IncludeSubdomains;
|
||||
use std::sync::mpsc::channel;
|
||||
use url::Url;
|
||||
use time;
|
||||
use url::Url;
|
||||
|
||||
#[test]
|
||||
fn test_add_hsts_entry_to_resource_manager_adds_an_hsts_entry() {
|
||||
|
|
|
@ -2,13 +2,12 @@
|
|||
* 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/. */
|
||||
|
||||
use net::mime_classifier::as_string_option;
|
||||
use net::mime_classifier::{Mp4Matcher, MIMEClassifier};
|
||||
use std::env;
|
||||
use std::fs::File;
|
||||
use std::io::{self, Read};
|
||||
use std::env;
|
||||
use std::path::{self, PathBuf};
|
||||
use net::mime_classifier::Mp4Matcher;
|
||||
use net::mime_classifier::MIMEClassifier;
|
||||
use net::mime_classifier::as_string_option;
|
||||
|
||||
fn read_file(path: &path::Path) -> io::Result<Vec<u8>> {
|
||||
let mut file = try!(File::open(path));
|
||||
|
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
use ipc_channel::ipc;
|
||||
use net::resource_task::new_resource_task;
|
||||
use net_traits::{ControlMsg, LoadData, LoadConsumer};
|
||||
use net_traits::hosts::{parse_hostsfile, host_replacement};
|
||||
use net_traits::ProgressMsg;
|
||||
use net_traits::{ControlMsg, LoadData, LoadConsumer, ProgressMsg};
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::mpsc::channel;
|
||||
|
|
|
@ -14,8 +14,8 @@ use msg::constellation_msg::SUPER;
|
|||
#[cfg(not(target_os="macos"))]
|
||||
use msg::constellation_msg::CONTROL;
|
||||
|
||||
use script::textinput::{TextInput, Selection, Lines, DeleteDir};
|
||||
use script::clipboard_provider::DummyClipboardContext;
|
||||
use script::textinput::{TextInput, Selection, Lines, DeleteDir};
|
||||
use std::borrow::ToOwned;
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -19,8 +19,8 @@ extern crate util;
|
|||
#[cfg(test)] mod viewport;
|
||||
|
||||
#[cfg(test)] mod writing_modes {
|
||||
use util::logical_geometry::WritingMode;
|
||||
use style::properties::{INITIAL_VALUES, get_writing_mode};
|
||||
use util::logical_geometry::WritingMode;
|
||||
|
||||
#[test]
|
||||
fn initial_writing_mode_is_empty() {
|
||||
|
|
|
@ -3,11 +3,10 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use euclid::size::Size2D;
|
||||
use style::stylesheets::{Stylesheet, CSSRuleIteratorExt};
|
||||
use style::stylesheets::Origin;
|
||||
use style::media_queries::*;
|
||||
use style::values::specified;
|
||||
use std::borrow::ToOwned;
|
||||
use style::media_queries::*;
|
||||
use style::stylesheets::{Origin, Stylesheet, CSSRuleIteratorExt};
|
||||
use style::values::specified;
|
||||
use url::Url;
|
||||
use util::geometry::Au;
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
* 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/. */
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::sync::Arc;
|
||||
use cssparser;
|
||||
use selectors::parser::*;
|
||||
use std::borrow::ToOwned;
|
||||
use std::sync::Arc;
|
||||
use string_cache::Atom;
|
||||
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock, DeclaredValue, longhands};
|
||||
use style::stylesheets::{CSSRule, StyleRule, Origin, Stylesheet};
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::Parser;
|
||||
use euclid::size::Size2D;
|
||||
use euclid::scale_factor::ScaleFactor;
|
||||
use euclid::size::Size2D;
|
||||
use style::media_queries::{Device, MediaType};
|
||||
use style::parser::ParserContext;
|
||||
use style::stylesheets::{Origin, Stylesheet, CSSRuleIteratorExt};
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use euclid::{Size2D, Point2D, SideOffsets2D, Rect};
|
||||
use util::logical_geometry::{WritingMode, LogicalSize, LogicalPoint, LogicalMargin, LogicalRect};
|
||||
use util::logical_geometry::{FLAG_RTL, FLAG_VERTICAL, FLAG_VERTICAL_LR, FLAG_SIDEWAYS_LEFT};
|
||||
use util::logical_geometry::{WritingMode, LogicalSize, LogicalPoint, LogicalMargin, LogicalRect};
|
||||
|
||||
#[cfg(test)]
|
||||
fn modes() -> [WritingMode; 10] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue