aboutsummaryrefslogtreecommitdiffstats
path: root/components/util
diff options
context:
space:
mode:
Diffstat (limited to 'components/util')
-rw-r--r--components/util/cache.rs6
-rw-r--r--components/util/deque/mod.rs6
-rw-r--r--components/util/geometry.rs4
-rw-r--r--components/util/logical_geometry.rs2
-rw-r--r--components/util/mem.rs20
-rw-r--r--components/util/opts.rs2
-rw-r--r--components/util/task.rs4
-rw-r--r--components/util/task_state.rs2
-rw-r--r--components/util/taskpool.rs4
-rw-r--r--components/util/tid.rs4
10 files changed, 27 insertions, 27 deletions
diff --git a/components/util/cache.rs b/components/util/cache.rs
index 86dc1c3af91..fa1e32c9ba6 100644
--- a/components/util/cache.rs
+++ b/components/util/cache.rs
@@ -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::default::Default;
use std::hash::{Hash, Hasher, SipHasher};
-use rand;
use std::slice::Iter;
-use std::default::Default;
pub struct HashCache<K, V> {
diff --git a/components/util/deque/mod.rs b/components/util/deque/mod.rs
index 41329c60195..a1ba1b429a1 100644
--- a/components/util/deque/mod.rs
+++ b/components/util/deque/mod.rs
@@ -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.
diff --git a/components/util/geometry.rs b/components/util/geometry.rs
index 12be3a64fbc..f25b93420cc 100644
--- a/components/util/geometry.rs
+++ b/components/util/geometry.rs
@@ -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};
diff --git a/components/util/logical_geometry.rs b/components/util/logical_geometry.rs
index ff316e49d34..c77f862fbbb 100644
--- a/components/util/logical_geometry.rs
+++ b/components/util/logical_geometry.rs
@@ -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};
diff --git a/components/util/mem.rs b/components/util/mem.rs
index 8619cbf2d5e..f336d22be0e 100644
--- a/components/util/mem.rs
+++ b/components/util/mem.rs
@@ -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.
diff --git a/components/util/opts.rs b/components/util/opts.rs
index 0e11006ab4e..65b40e77b73 100644
--- a/components/util/opts.rs
+++ b/components/util/opts.rs
@@ -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};
diff --git a/components/util/task.rs b/components/util/task.rs
index d00f29c1c67..0da712f5d06 100644
--- a/components/util/task.rs
+++ b/components/util/task.rs
@@ -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
diff --git a/components/util/task_state.rs b/components/util/task_state.rs
index 0072fb00fb6..0f559b98b4c 100644
--- a/components/util/task_state.rs
+++ b/components/util/task_state.rs
@@ -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));
diff --git a/components/util/taskpool.rs b/components/util/taskpool.rs
index bd67d819922..04059e00f7e 100644
--- a/components/util/taskpool.rs
+++ b/components/util/taskpool.rs
@@ -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>>,
diff --git a/components/util/tid.rs b/components/util/tid.rs
index 9a01a19f6ce..a07508cdb2b 100644
--- a/components/util/tid.rs
+++ b/components/util/tid.rs
@@ -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;