sort all uses

This commit is contained in:
Johann Tuffe 2015-08-20 20:47:12 +08:00
parent d3c7e31722
commit ec07178b6f
269 changed files with 903 additions and 931 deletions

View file

@ -2,14 +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 rand;
use rand::Rng;
use std::collections::HashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::collections::hash_state::DefaultState;
use rand::Rng;
use std::hash::{Hash, Hasher, SipHasher};
use rand;
use std::slice::Iter;
use std::default::Default;
use std::hash::{Hash, Hasher, SipHasher};
use std::slice::Iter;
pub struct HashCache<K, V> {

View file

@ -49,15 +49,15 @@
pub use self::Stolen::{Empty, Abort, Data};
use std::sync::Arc;
use std::rt::heap::{allocate, deallocate};
use std::marker;
use std::mem::{forget, align_of, size_of, transmute};
use std::ptr;
use std::rt::heap::{allocate, deallocate};
use std::sync::Arc;
use std::sync::Mutex;
use std::sync::atomic::{AtomicIsize, AtomicPtr};
use std::sync::atomic::Ordering::{Relaxed, SeqCst};
use std::sync::atomic::{AtomicIsize, AtomicPtr};
// Once the queue is less than 1/K full, then it will be downsized. Note that
// the deque requires that this number be less than 2.

View file

@ -5,14 +5,14 @@
use cssparser::ToCss;
use euclid::length::Length;
use euclid::num::Zero;
use euclid::point::Point2D;
use euclid::rect::Rect;
use euclid::size::Size2D;
use euclid::num::Zero;
use std::default::Default;
use std::i32;
use std::fmt;
use std::i32;
use std::ops::{Add, Sub, Neg, Mul, Div, Rem};
use rustc_serialize::{Encoder, Encodable};

View file

@ -4,8 +4,8 @@
//! Geometry in flow-relative space.
use euclid::{Size2D, Point2D, SideOffsets2D, Rect};
use euclid::num::Zero;
use euclid::{Size2D, Point2D, SideOffsets2D, Rect};
use std::cmp::{min, max};
use std::fmt::{self, Debug, Formatter, Error};
use std::ops::{Add, Sub};

View file

@ -9,35 +9,35 @@ use std::cell::{Cell, RefCell};
use std::collections::{HashMap, LinkedList, hash_state};
use std::hash::Hash;
use std::mem::{size_of, transmute};
use std::sync::Arc;
use std::rc::Rc;
use std::result::Result;
use std::sync::Arc;
use azure::azure_hl::Color;
use cssparser::Color as CSSParserColor;
use cssparser::RGBA;
use cursor::Cursor;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D, Matrix4};
use euclid::length::Length;
use euclid::scale_factor::ScaleFactor;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D, Matrix4};
use geometry::{PagePx, ViewportPx, Au};
use html5ever::tree_builder::QuirksMode;
use layers::geometry::DevicePixel;
use hyper::header::ContentType;
use hyper::http::RawStatus;
use hyper::method::Method;
use hyper::mime::{Mime, TopLevel, SubLevel, Attr, Value};
use js::jsapi::Heap;
use js::rust::GCMethods;
use js::jsval::JSVal;
use js::rust::GCMethods;
use layers::geometry::DevicePixel;
use logical_geometry::WritingMode;
use rand::OsRng;
use range::Range;
use selectors::parser::{PseudoElement, Selector, CompoundSelector, SimpleSelector, Combinator};
use str::LengthOrPercentageOrAuto;
use string_cache::atom::Atom;
use string_cache::namespace::Namespace;
use url;
use hyper::method::Method;
use hyper::http::RawStatus;
use hyper::header::ContentType;
use hyper::mime::{Mime, TopLevel, SubLevel, Attr, Value};
use selectors::parser::{PseudoElement, Selector, CompoundSelector, SimpleSelector, Combinator};
use rand::OsRng;
extern {
// Get the size of a heap block.

View file

@ -13,8 +13,8 @@ use num_cpus;
use std::cmp;
use std::default::Default;
use std::env;
use std::io::{self, Read, Write};
use std::fs::{File, PathExt};
use std::io::{self, Read, Write};
use std::path::Path;
use std::process;
use std::sync::atomic::{AtomicBool, Ordering, ATOMIC_BOOL_INIT};

View file

@ -3,10 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use std::borrow::ToOwned;
use task_state;
use std::thread;
use std::sync::mpsc::Sender;
use std::thread;
use std::thread::Builder;
use task_state;
pub fn spawn_named<F>(name: String, f: F)
where F: FnOnce() + Send + 'static

View file

@ -49,8 +49,8 @@ task_types! {
#[cfg(debug_assertions)]
mod imp {
use super::{TaskState, TYPES};
use std::cell::RefCell;
use super::{TaskState, TYPES};
thread_local!(static STATE: RefCell<Option<TaskState>> = RefCell::new(None));

View file

@ -15,10 +15,10 @@
// The only difference is that a normal channel is used instead of a sync_channel.
//
use task::spawn_named;
use std::boxed::FnBox;
use std::sync::{Arc, Mutex};
use std::sync::mpsc::{channel, Sender, Receiver};
use std::sync::{Arc, Mutex};
use task::spawn_named;
pub struct TaskPool {
tx: Sender<Box<FnBox() + Send + 'static>>,

View file

@ -2,9 +2,9 @@
* 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::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
use std::rc::Rc;
use std::cell::RefCell;
use std::rc::Rc;
use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
static mut next_tid: AtomicUsize = ATOMIC_USIZE_INIT;