diff options
55 files changed, 92 insertions, 89 deletions
diff --git a/components/compositing/lib.rs b/components/compositing/lib.rs index 472c7bbd71f..9ff82438d66 100644 --- a/components/compositing/lib.rs +++ b/components/compositing/lib.rs @@ -40,7 +40,7 @@ extern crate webrender_traits; pub use compositor_thread::{CompositorEventListener, CompositorProxy, CompositorThread}; use euclid::size::TypedSize2D; use gfx::paint_thread::ChromeToPaintMsg; -use ipc_channel::ipc::{IpcSender}; +use ipc_channel::ipc::IpcSender; use layout_traits::LayoutControlChan; use msg::constellation_msg::PipelineId; use script_traits::ConstellationControlMsg; diff --git a/components/gfx/paint_thread.rs b/components/gfx/paint_thread.rs index 51cddfb008e..bafe17ce015 100644 --- a/components/gfx/paint_thread.rs +++ b/components/gfx/paint_thread.rs @@ -31,7 +31,7 @@ use std::mem as std_mem; use std::sync::Arc; use std::sync::mpsc::{Receiver, Sender, channel}; use url::Url; -use util::geometry::{ExpandToPixelBoundaries}; +use util::geometry::ExpandToPixelBoundaries; use util::opts; use util::thread; use util::thread_state; diff --git a/components/gfx/platform/freetype/font.rs b/components/gfx/platform/freetype/font.rs index caf04e53699..7bc26800df0 100644 --- a/components/gfx/platform/freetype/font.rs +++ b/components/gfx/platform/freetype/font.rs @@ -7,6 +7,7 @@ extern crate freetype; use app_units::Au; use font::{FontHandleMethods, FontMetrics, FontTableMethods}; use font::{FontTableTag, FractionalPixel, GPOS, GSUB, KERN}; +use freetype::freetype::ft_sfnt_os2; use freetype::freetype::{FTErrorMethods, FT_F26Dot6, FT_Face, FT_FaceRec}; use freetype::freetype::{FT_Done_Face, FT_New_Memory_Face}; use freetype::freetype::{FT_Get_Char_Index, FT_Get_Postscript_Name}; @@ -15,7 +16,6 @@ use freetype::freetype::{FT_GlyphSlot, FT_Library, FT_Long, FT_ULong}; use freetype::freetype::{FT_KERNING_DEFAULT, FT_STYLE_FLAG_BOLD, FT_STYLE_FLAG_ITALIC}; use freetype::freetype::{FT_Load_Glyph, FT_Set_Char_Size}; use freetype::freetype::{FT_SizeRec, FT_Size_Metrics, FT_UInt, struct_FT_Vector_}; -use freetype::freetype::{ft_sfnt_os2}; use freetype::tt_os2::TT_OS2; use libc::c_char; use platform::font_context::FontContextHandle; diff --git a/components/gfx/platform/macos/font.rs b/components/gfx/platform/macos/font.rs index 4a12b50163a..4e4ae77213b 100644 --- a/components/gfx/platform/macos/font.rs +++ b/components/gfx/platform/macos/font.rs @@ -16,8 +16,8 @@ use core_foundation::string::UniChar; use core_graphics::font::CGGlyph; use core_graphics::geometry::CGRect; use core_text::font::CTFont; +use core_text::font_descriptor::kCTFontDefaultOrientation; use core_text::font_descriptor::{SymbolicTraitAccessors, TraitAccessors}; -use core_text::font_descriptor::{kCTFontDefaultOrientation}; use font::{FontHandleMethods, FontMetrics, FontTableTag, FontTableMethods, FractionalPixel}; use font::{GPOS, GSUB, KERN}; use platform::font_template::FontTemplateData; diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs index 517e20917c5..5e6b025e21c 100644 --- a/components/gfx/text/shaping/harfbuzz.rs +++ b/components/gfx/text/shaping/harfbuzz.rs @@ -6,31 +6,31 @@ use app_units::Au; use euclid::Point2D; use font::{DISABLE_KERNING_SHAPING_FLAG, Font, FontTableMethods, FontTableTag}; use font::{IGNORE_LIGATURES_SHAPING_FLAG, KERN, RTL_FLAG, ShapingOptions}; +use harfbuzz::hb_blob_t; +use harfbuzz::hb_bool_t; +use harfbuzz::hb_buffer_add_utf8; +use harfbuzz::hb_buffer_destroy; +use harfbuzz::hb_buffer_get_glyph_positions; +use harfbuzz::hb_buffer_get_length; +use harfbuzz::hb_face_destroy; +use harfbuzz::hb_feature_t; +use harfbuzz::hb_font_create; +use harfbuzz::hb_font_funcs_create; +use harfbuzz::hb_font_funcs_set_glyph_func; +use harfbuzz::hb_font_funcs_set_glyph_h_advance_func; +use harfbuzz::hb_font_funcs_set_glyph_h_kerning_func; +use harfbuzz::hb_font_set_funcs; +use harfbuzz::hb_font_set_ppem; +use harfbuzz::hb_font_set_scale; +use harfbuzz::hb_glyph_info_t; +use harfbuzz::hb_glyph_position_t; use harfbuzz::{HB_DIRECTION_LTR, HB_DIRECTION_RTL, HB_MEMORY_MODE_READONLY}; use harfbuzz::{hb_blob_create, hb_face_create_for_tables}; -use harfbuzz::{hb_blob_t}; -use harfbuzz::{hb_bool_t}; -use harfbuzz::{hb_buffer_add_utf8}; use harfbuzz::{hb_buffer_create, hb_font_destroy}; -use harfbuzz::{hb_buffer_destroy}; use harfbuzz::{hb_buffer_get_glyph_infos, hb_shape}; -use harfbuzz::{hb_buffer_get_glyph_positions}; -use harfbuzz::{hb_buffer_get_length}; use harfbuzz::{hb_buffer_set_direction, hb_buffer_set_script}; use harfbuzz::{hb_buffer_t, hb_codepoint_t, hb_font_funcs_t}; -use harfbuzz::{hb_face_destroy}; use harfbuzz::{hb_face_t, hb_font_t}; -use harfbuzz::{hb_feature_t}; -use harfbuzz::{hb_font_create}; -use harfbuzz::{hb_font_funcs_create}; -use harfbuzz::{hb_font_funcs_set_glyph_func}; -use harfbuzz::{hb_font_funcs_set_glyph_h_advance_func}; -use harfbuzz::{hb_font_funcs_set_glyph_h_kerning_func}; -use harfbuzz::{hb_font_set_funcs}; -use harfbuzz::{hb_font_set_ppem}; -use harfbuzz::{hb_font_set_scale}; -use harfbuzz::{hb_glyph_info_t}; -use harfbuzz::{hb_glyph_position_t}; use harfbuzz::{hb_position_t, hb_tag_t}; use libc::{c_char, c_int, c_uint, c_void}; use platform::font::FontTable; diff --git a/components/gfx/text/text_run.rs b/components/gfx/text/text_run.rs index af8dba7b8a0..24024908ddc 100644 --- a/components/gfx/text/text_run.rs +++ b/components/gfx/text/text_run.rs @@ -3,8 +3,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use app_units::Au; +use font::ShapingOptions; use font::{Font, FontHandleMethods, FontMetrics, IS_WHITESPACE_SHAPING_FLAG, RunMetrics}; -use font::{ShapingOptions}; use platform::font_template::FontTemplateData; use range::Range; use std::cell::Cell; diff --git a/components/gfx_traits/lib.rs b/components/gfx_traits/lib.rs index 64474d496bf..6065704648d 100644 --- a/components/gfx_traits/lib.rs +++ b/components/gfx_traits/lib.rs @@ -24,7 +24,7 @@ pub use paint_listener::PaintListener; use azure::azure_hl::Color; use euclid::Matrix4D; use euclid::rect::Rect; -use msg::constellation_msg::{PipelineId}; +use msg::constellation_msg::PipelineId; use std::fmt::{self, Debug, Formatter}; #[derive(Clone, Copy, Debug, PartialEq)] diff --git a/components/layout/block.rs b/components/layout/block.rs index 42cc4e6abd4..d5decf50c8d 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -33,16 +33,16 @@ use display_list_builder::BlockFlowDisplayListBuilding; use display_list_builder::{BorderPaintingMode, DisplayListBuildState, FragmentDisplayListBuilding}; use euclid::{Point2D, Rect, Size2D}; use floats::{ClearType, FloatKind, Floats, PlacementInfo}; +use flow::IS_ABSOLUTELY_POSITIONED; use flow::{BLOCK_POSITION_IS_STATIC, CLEARS_LEFT, CLEARS_RIGHT}; use flow::{CONTAINS_TEXT_OR_REPLACED_FRAGMENTS, INLINE_POSITION_IS_STATIC}; -use flow::{IS_ABSOLUTELY_POSITIONED}; use flow::{ImmutableFlowUtils, LateAbsolutePositionInfo, MutableFlowUtils, OpaqueFlow}; use flow::{NEEDS_LAYER, PreorderFlowTraversal, FragmentationContext}; use flow::{self, BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ForceNonfloatedFlag}; use flow_list::FlowList; use flow_ref::FlowRef; +use fragment::SpecificFragmentInfo; use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, HAS_LAYER, Overflow}; -use fragment::{SpecificFragmentInfo}; use gfx::display_list::{ClippingRegion, StackingContext, StackingContextId}; use gfx_traits::LayerId; use incremental::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, REPAINT}; diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 77b388e8ade..d08e8ad374c 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -22,11 +22,11 @@ use floats::FloatKind; use flow::{MutableFlowUtils, MutableOwnedFlowUtils, CAN_BE_FRAGMENTED}; use flow::{self, AbsoluteDescendants, IS_ABSOLUTELY_POSITIONED, ImmutableFlowUtils}; use flow_ref::{self, FlowRef}; +use fragment::WhitespaceStrippingResult; use fragment::{CanvasFragmentInfo, ImageFragmentInfo, InlineAbsoluteFragmentInfo}; use fragment::{Fragment, GeneratedContentInfo, IframeFragmentInfo}; use fragment::{InlineAbsoluteHypotheticalFragmentInfo, TableColumnFragmentInfo}; use fragment::{InlineBlockFragmentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo}; -use fragment::{WhitespaceStrippingResult}; use gfx::display_list::OpaqueNode; use incremental::{BUBBLE_ISIZES, RECONSTRUCT_FLOW, RestyleDamage}; use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFlow, InlineFragmentNodeFlags}; @@ -44,8 +44,8 @@ use std::mem; use std::sync::Arc; use std::sync::atomic::Ordering; use style::computed_values::content::ContentItem; +use style::computed_values::position; use style::computed_values::{caption_side, display, empty_cells, float, list_style_position}; -use style::computed_values::{position}; use style::properties::{self, ComputedValues, ServoComputedValues}; use style::servo::SharedStyleContext; use table::TableFlow; diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index c9314aa08f6..e9d7f02bad3 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -19,12 +19,12 @@ use euclid::{Matrix4D, Point2D, Point3D, Rect, SideOffsets2D, Size2D}; use flex::FlexFlow; use flow::{BaseFlow, Flow, IS_ABSOLUTELY_POSITIONED}; use flow_ref; +use fragment::SpecificFragmentInfo; use fragment::{CoordinateSystem, Fragment, HAS_LAYER, ImageFragmentInfo, ScannedTextFragmentInfo}; -use fragment::{SpecificFragmentInfo}; +use gfx::display_list::GradientDisplayItem; use gfx::display_list::{BLUR_INFLATION_FACTOR, BaseDisplayItem, BorderDisplayItem}; use gfx::display_list::{BorderRadii, BoxShadowClipMode, BoxShadowDisplayItem, ClippingRegion}; use gfx::display_list::{DisplayItem, DisplayItemMetadata, DisplayListSection}; -use gfx::display_list::{GradientDisplayItem}; use gfx::display_list::{GradientStop, IframeDisplayItem, ImageDisplayItem, WebGLDisplayItem, LayeredItem, LayerInfo}; use gfx::display_list::{LineDisplayItem, OpaqueNode, SolidColorDisplayItem}; use gfx::display_list::{StackingContext, StackingContextId, StackingContextType}; @@ -33,7 +33,7 @@ use gfx::paint_thread::THREAD_TINT_COLORS; use gfx::text::glyph::ByteIndex; use gfx_traits::{color, ScrollPolicy}; use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFlow, LAST_FRAGMENT_OF_ELEMENT}; -use ipc_channel::ipc::{self}; +use ipc_channel::ipc; use list_item::ListItemFlow; use model::{self, MaybeAuto, ToGfxMatrix}; use net_traits::image::base::PixelFormat; diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index f2da09b734c..3a5d90201bd 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -42,8 +42,8 @@ use style::computed_values::{vertical_align, white_space, word_break, z_index}; use style::dom::TRestyleDamage; use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode}; use style::properties::{ComputedValues, ServoComputedValues}; +use style::values::computed::LengthOrPercentageOrNone; use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto}; -use style::values::computed::{LengthOrPercentageOrNone}; use text; use text::TextRunScanner; use url::Url; diff --git a/components/layout/generated_content.rs b/components/layout/generated_content.rs index 7cde02a8781..a7e9c8f463a 100644 --- a/components/layout/generated_content.rs +++ b/components/layout/generated_content.rs @@ -9,7 +9,7 @@ //! as possible. use context::LayoutContext; -use flow::{InorderFlowTraversal}; +use flow::InorderFlowTraversal; use flow::{self, AFFECTS_COUNTERS, Flow, HAS_COUNTER_AFFECTING_CHILDREN, ImmutableFlowUtils}; use fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo}; use gfx::display_list::OpaqueNode; diff --git a/components/layout/inline.rs b/components/layout/inline.rs index 6db570eb6eb..4615b728335 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -11,12 +11,12 @@ use display_list_builder::DisplayListBuildState; use display_list_builder::{FragmentDisplayListBuilding, InlineFlowDisplayListBuilding}; use euclid::{Point2D, Size2D}; use floats::{FloatKind, Floats, PlacementInfo}; +use flow::OpaqueFlow; use flow::{CONTAINS_TEXT_OR_REPLACED_FRAGMENTS, EarlyAbsolutePositionInfo, MutableFlowUtils}; -use flow::{OpaqueFlow}; use flow::{self, BaseFlow, Flow, FlowClass, ForceNonfloatedFlag, IS_ABSOLUTELY_POSITIONED}; use flow_ref; +use fragment::SpecificFragmentInfo; use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow}; -use fragment::{SpecificFragmentInfo}; use gfx::display_list::{OpaqueNode, StackingContext, StackingContextId}; use gfx::font::FontMetrics; use gfx::font_context::FontContext; diff --git a/components/layout/layout_thread.rs b/components/layout/layout_thread.rs index c867079d601..6b56cb6e348 100644 --- a/components/layout/layout_thread.rs +++ b/components/layout/layout_thread.rs @@ -21,16 +21,16 @@ use euclid::size::Size2D; use flow::{self, Flow, ImmutableFlowUtils, MutableOwnedFlowUtils}; use flow_ref::{self, FlowRef}; use fnv::FnvHasher; +use gfx::display_list::WebRenderImageInfo; use gfx::display_list::{ClippingRegion, DisplayItemMetadata, DisplayList, LayerInfo}; use gfx::display_list::{OpaqueNode, StackingContext, StackingContextId, StackingContextType}; -use gfx::display_list::{WebRenderImageInfo}; use gfx::font; use gfx::font_cache_thread::FontCacheThread; use gfx::font_context; use gfx::paint_thread::LayoutToPaintMsg; use gfx_traits::{color, Epoch, LayerId, ScrollPolicy}; use heapsize::HeapSizeOf; -use incremental::{LayoutDamageComputation}; +use incremental::LayoutDamageComputation; use incremental::{REPAINT, STORE_OVERFLOW, REFLOW_OUT_OF_FLOW, REFLOW, REFLOW_ENTIRE_DOCUMENT}; use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; use ipc_channel::router::ROUTER; @@ -38,16 +38,16 @@ use layout_debug; use layout_traits::{ConvertPipelineIdToWebRender, LayoutThreadFactory}; use log; use msg::constellation_msg::{PanicMsg, PipelineId}; +use net_traits::image_cache_thread::UsePlaceholder; use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheResult, ImageCacheThread}; -use net_traits::image_cache_thread::{UsePlaceholder}; use parallel; use profile_traits::mem::{self, Report, ReportKind, ReportsChan}; use profile_traits::time::{TimerMetadataFrameType, TimerMetadataReflowType}; use profile_traits::time::{self, TimerMetadata, profile}; +use query::process_offset_parent_query; use query::{LayoutRPCImpl, process_content_box_request, process_content_boxes_request}; use query::{process_node_geometry_request, process_node_layer_id_request, process_node_scroll_area_request}; use query::{process_node_overflow_request, process_resolved_style_request, process_margin_style_query}; -use query::{process_offset_parent_query}; use script::dom::node::OpaqueStyleAndLayoutData; use script::layout_interface::{LayoutRPC, OffsetParentResponse, NodeOverflowResponse, MarginStyleResponse}; use script::layout_interface::{Msg, NewLayoutThreadInfo, Reflow, ReflowQueryType, ScriptReflow}; @@ -65,7 +65,7 @@ use std::sync::mpsc::{channel, Sender, Receiver}; use std::sync::{Arc, Mutex, MutexGuard, RwLock}; use style::animation::Animation; use style::computed_values::{filter, mix_blend_mode}; -use style::context::{ReflowGoal}; +use style::context::ReflowGoal; use style::dom::{TDocument, TElement, TNode}; use style::error_reporting::ParseErrorReporter; use style::logical_geometry::LogicalPoint; diff --git a/components/layout/list_item.rs b/components/layout/list_item.rs index d499d2a08b3..9b44ed78640 100644 --- a/components/layout/list_item.rs +++ b/components/layout/list_item.rs @@ -14,8 +14,8 @@ use display_list_builder::{DisplayListBuildState, ListItemFlowDisplayListBuildin use euclid::Point2D; use floats::FloatKind; use flow::{Flow, FlowClass, OpaqueFlow}; +use fragment::Overflow; use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo}; -use fragment::{Overflow}; use generated_content; use gfx::display_list::{StackingContext, StackingContextId}; use incremental::RESOLVE_GENERATED_CONTENT; diff --git a/components/layout/opaque_node.rs b/components/layout/opaque_node.rs index 8bde9e6cc09..023b9cb34c0 100644 --- a/components/layout/opaque_node.rs +++ b/components/layout/opaque_node.rs @@ -8,7 +8,7 @@ use gfx::display_list::OpaqueNode; use libc::{c_void, uintptr_t}; use script::dom::bindings::js::LayoutJS; use script::dom::node::Node; -use script::layout_interface::{TrustedNodeAddress}; +use script::layout_interface::TrustedNodeAddress; use script_traits::UntrustedNodeAddress; pub trait OpaqueNodeMethods { diff --git a/components/layout/parallel.rs b/components/layout/parallel.rs index 2c622b99603..b0afae2eeed 100644 --- a/components/layout/parallel.rs +++ b/components/layout/parallel.rs @@ -15,8 +15,8 @@ use profile_traits::time::{self, TimerMetadata, profile}; use std::mem; use std::sync::atomic::{AtomicIsize, Ordering}; use style::dom::UnsafeNode; +use style::parallel::run_queue_with_custom_work_data_type; use style::parallel::{CHUNK_SIZE, WorkQueueData}; -use style::parallel::{run_queue_with_custom_work_data_type}; use traversal::AssignBSizes; use traversal::{AssignISizes, BubbleISizes}; use util::opts; diff --git a/components/layout/query.rs b/components/layout/query.rs index 162a7642724..2fae4974e25 100644 --- a/components/layout/query.rs +++ b/components/layout/query.rs @@ -13,7 +13,7 @@ use flow; use flow_ref::FlowRef; use fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo}; use gfx::display_list::OpaqueNode; -use gfx_traits::{LayerId}; +use gfx_traits::LayerId; use layout_thread::LayoutThreadData; use opaque_node::OpaqueNodeMethods; use script::layout_interface::{ContentBoxResponse, NodeOverflowResponse, ContentBoxesResponse, NodeGeometryResponse}; diff --git a/components/layout/table.rs b/components/layout/table.rs index 0585a509f09..9ed0dfd02d7 100644 --- a/components/layout/table.rs +++ b/components/layout/table.rs @@ -12,8 +12,8 @@ use block::{ISizeConstraintInput, ISizeConstraintSolution}; use context::LayoutContext; use display_list_builder::{BlockFlowDisplayListBuilding, BorderPaintingMode, DisplayListBuildState}; use euclid::Point2D; +use flow; use flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, OpaqueFlow}; -use flow::{self}; use flow_list::MutFlowListIterator; use fragment::{Fragment, FragmentBorderBoxIterator, Overflow}; use gfx::display_list::{StackingContext, StackingContextId}; @@ -28,7 +28,7 @@ use style::logical_geometry::LogicalSize; use style::properties::{ComputedValues, ServoComputedValues}; use style::values::CSSFloat; use style::values::computed::LengthOrPercentageOrAuto; -use table_row::{TableRowFlow}; +use table_row::TableRowFlow; use table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance}; use table_wrapper::TableLayout; use util::print_tree::PrintTree; diff --git a/components/layout/table_cell.rs b/components/layout/table_cell.rs index 37a916a920a..06cb1e31ecc 100644 --- a/components/layout/table_cell.rs +++ b/components/layout/table_cell.rs @@ -26,7 +26,7 @@ use style::properties::{ComputedValues, ServoComputedValues}; use table::InternalTable; use table_row::{CollapsedBorder, CollapsedBorderProvenance}; use util::print_tree::PrintTree; -use wrapper::{ThreadSafeLayoutNode}; +use wrapper::ThreadSafeLayoutNode; /// A table formatting context. #[derive(RustcEncodable)] diff --git a/components/layout/text.rs b/components/layout/text.rs index 3ba9be9f949..b2f08fff75b 100644 --- a/components/layout/text.rs +++ b/components/layout/text.rs @@ -21,8 +21,8 @@ use std::borrow::ToOwned; use std::collections::LinkedList; use std::mem; use std::sync::Arc; +use style::computed_values::white_space; use style::computed_values::{line_height, text_orientation, text_rendering, text_transform}; -use style::computed_values::{white_space}; use style::logical_geometry::{LogicalSize, WritingMode}; use style::properties::style_structs::ServoFont; use style::properties::{ComputedValues, ServoComputedValues}; diff --git a/components/net/hsts.rs b/components/net/hsts.rs index b64b797c754..662ec7b8088 100644 --- a/components/net/hsts.rs +++ b/components/net/hsts.rs @@ -3,9 +3,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use net_traits::IncludeSubdomains; -use rustc_serialize::json::{decode}; +use rustc_serialize::json::decode; use std::net::{Ipv4Addr, Ipv6Addr}; -use std::str::{from_utf8}; +use std::str::from_utf8; use time; use url::Url; use util::resource_files::read_resource_file; diff --git a/components/net/resource_thread.rs b/components/net/resource_thread.rs index 9c6a138da32..76d44fd704a 100644 --- a/components/net/resource_thread.rs +++ b/components/net/resource_thread.rs @@ -9,7 +9,7 @@ use connector::{Connector, create_http_connector}; use cookie; use cookie_storage::CookieStorage; use data_loader; -use devtools_traits::{DevtoolsControlMsg}; +use devtools_traits::DevtoolsControlMsg; use file_loader; use filemanager_thread::FileManagerThreadFactory; use hsts::HstsList; diff --git a/components/profile/trace_dump.rs b/components/profile/trace_dump.rs index 8f53d4a9e37..1344b8a4ccf 100644 --- a/components/profile/trace_dump.rs +++ b/components/profile/trace_dump.rs @@ -5,7 +5,7 @@ //! A module for writing time profiler traces out to a self contained HTML file. use profile_traits::time::{ProfilerCategory, TimerMetadata}; -use serde_json::{self}; +use serde_json; use std::fs; use std::io::Write; diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs index 607f74456d2..7b432a02f10 100644 --- a/components/script/dom/bindings/utils.rs +++ b/components/script/dom/bindings/utils.rs @@ -16,6 +16,7 @@ use dom::bindings::trace::trace_object; use dom::browsingcontext; use heapsize::HeapSizeOf; use js; +use js::JS_CALLEE; use js::glue::{CallJitGetterOp, CallJitMethodOp, CallJitSetterOp, IsWrapper}; use js::glue::{GetCrossCompartmentWrapper, WrapperNew}; use js::glue::{RUST_FUNCTION_VALUE_TO_JITINFO, RUST_JSID_IS_INT, RUST_JSID_IS_STRING}; @@ -32,7 +33,6 @@ use js::jsapi::{JS_SetReservedSlot, JS_StringHasLatin1Chars, MutableHandleValue, use js::jsapi::{OnNewGlobalHookOption, RootedObject, RootedValue}; use js::jsval::{JSVal, ObjectValue, PrivateValue, UndefinedValue}; use js::rust::{GCMethods, ToString}; -use js::{JS_CALLEE}; use libc; use std::default::Default; use std::ffi::CString; diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 89755564bb6..9def730b796 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -100,7 +100,7 @@ use net_traits::CookieSource::NonHTTP; use net_traits::CoreResourceMsg::{GetCookiesForUrl, SetCookiesForUrl}; use net_traits::response::HttpsState; use net_traits::{AsyncResponseTarget, PendingAsyncLoad, IpcSend}; -use num_traits::{ToPrimitive}; +use num_traits::ToPrimitive; use origin::Origin; use parse::{ParserRoot, ParserRef, MutNullableParserField}; use script_thread::{MainThreadScriptMsg, Runnable}; diff --git a/components/script/dom/domquad.rs b/components/script/dom/domquad.rs index dbfb1f201d4..a53464739dc 100644 --- a/components/script/dom/domquad.rs +++ b/components/script/dom/domquad.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::DOMPointBinding::{DOMPointInit, DOMPointMethods}; use dom::bindings::codegen::Bindings::DOMQuadBinding::{DOMQuadInit, DOMQuadMethods, Wrap}; -use dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::{DOMRectInit}; +use dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::DOMRectInit; use dom::bindings::error::Fallible; use dom::bindings::global::GlobalRef; use dom::bindings::js::{Root, JS}; diff --git a/components/script/dom/forcetouchevent.rs b/components/script/dom/forcetouchevent.rs index 95532cb5c8f..1bc8a966cc5 100644 --- a/components/script/dom/forcetouchevent.rs +++ b/components/script/dom/forcetouchevent.rs @@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::ForceTouchEventBinding::ForceTouchEventMet use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods; use dom::bindings::global::GlobalRef; use dom::bindings::inheritance::Castable; -use dom::bindings::js::{Root}; +use dom::bindings::js::Root; use dom::bindings::num::Finite; use dom::bindings::reflector::reflect_dom_object; use dom::bindings::str::DOMString; diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 3913d46b884..ad6c5952f87 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -13,7 +13,7 @@ use dom::bindings::codegen::Bindings::BrowserElementBinding::BrowserShowModalPro use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding; use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementMethods; use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; -use dom::bindings::conversions::{ToJSValConvertible}; +use dom::bindings::conversions::ToJSValConvertible; use dom::bindings::error::{Error, ErrorResult}; use dom::bindings::global::GlobalRef; use dom::bindings::inheritance::Castable; diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs index 88de9756267..81b516e0772 100644 --- a/components/script/dom/htmllinkelement.rs +++ b/components/script/dom/htmllinkelement.rs @@ -9,8 +9,7 @@ use dom::bindings::cell::DOMRefCell; use dom::bindings::codegen::Bindings::HTMLLinkElementBinding; use dom::bindings::codegen::Bindings::HTMLLinkElementBinding::HTMLLinkElementMethods; use dom::bindings::inheritance::Castable; -use dom::bindings::js::{JS, MutNullableHeap, Root}; -use dom::bindings::js::{RootedReference}; +use dom::bindings::js::{JS, MutNullableHeap, Root, RootedReference}; use dom::bindings::refcounted::Trusted; use dom::bindings::str::DOMString; use dom::document::Document; diff --git a/components/script/dom/mimetype.rs b/components/script/dom/mimetype.rs index 4757c4e7850..94262de5c26 100644 --- a/components/script/dom/mimetype.rs +++ b/components/script/dom/mimetype.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::MimeTypeBinding::MimeTypeMethods; use dom::bindings::js::Root; -use dom::bindings::reflector::{Reflector}; +use dom::bindings::reflector::Reflector; use dom::bindings::str::DOMString; use dom::plugin::Plugin; diff --git a/components/script/dom/plugin.rs b/components/script/dom/plugin.rs index 8fcd3f3a2e6..dc4ca4fe42d 100644 --- a/components/script/dom/plugin.rs +++ b/components/script/dom/plugin.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::PluginBinding::PluginMethods; use dom::bindings::js::Root; -use dom::bindings::reflector::{Reflector}; +use dom::bindings::reflector::Reflector; use dom::bindings::str::DOMString; use dom::mimetype::MimeType; diff --git a/components/script/dom/storageevent.rs b/components/script/dom/storageevent.rs index 71e3dc26350..1c9b563b037 100644 --- a/components/script/dom/storageevent.rs +++ b/components/script/dom/storageevent.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::EventBinding::EventMethods; use dom::bindings::codegen::Bindings::StorageEventBinding; -use dom::bindings::codegen::Bindings::StorageEventBinding::{StorageEventMethods}; +use dom::bindings::codegen::Bindings::StorageEventBinding::StorageEventMethods; use dom::bindings::error::Fallible; use dom::bindings::global::GlobalRef; use dom::bindings::inheritance::Castable; diff --git a/components/script/dom/stylesheet.rs b/components/script/dom/stylesheet.rs index 0801d82fcad..15b8693c537 100644 --- a/components/script/dom/stylesheet.rs +++ b/components/script/dom/stylesheet.rs @@ -5,7 +5,7 @@ use dom::bindings::codegen::Bindings::StyleSheetBinding; use dom::bindings::codegen::Bindings::StyleSheetBinding::StyleSheetMethods; use dom::bindings::global::GlobalRef; -use dom::bindings::js::{Root}; +use dom::bindings::js::Root; use dom::bindings::reflector::{Reflector, reflect_dom_object}; use dom::bindings::str::DOMString; use dom::window::Window; diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index faf53596ecc..0fe50d64fd3 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -29,7 +29,7 @@ use js::jsval::{JSVal, NullValue}; use std::borrow::ToOwned; use std::ptr; use std::rc::Rc; -use util::prefs::{get_pref}; +use util::prefs::get_pref; #[dom_struct] pub struct TestBinding { diff --git a/components/script/dom/text.rs b/components/script/dom/text.rs index 3d3100bcf4d..5d377e1e05d 100644 --- a/components/script/dom/text.rs +++ b/components/script/dom/text.rs @@ -11,7 +11,7 @@ use dom::bindings::error::{Error, Fallible}; use dom::bindings::global::GlobalRef; use dom::bindings::inheritance::Castable; use dom::bindings::js::Root; -use dom::bindings::js::{RootedReference}; +use dom::bindings::js::RootedReference; use dom::bindings::str::DOMString; use dom::characterdata::CharacterData; use dom::document::Document; diff --git a/components/script/dom/userscripts.rs b/components/script/dom/userscripts.rs index dd9acb93a92..25490fb7726 100644 --- a/components/script/dom/userscripts.rs +++ b/components/script/dom/userscripts.rs @@ -5,7 +5,7 @@ use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use dom::bindings::inheritance::Castable; -use dom::bindings::js::{RootedReference}; +use dom::bindings::js::RootedReference; use dom::bindings::str::DOMString; use dom::htmlheadelement::HTMLHeadElement; use dom::node::Node; diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs index 9dc4d7c16be..93522addf35 100644 --- a/components/script/dom/webglframebuffer.rs +++ b/components/script/dom/webglframebuffer.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl -use canvas_traits::{CanvasMsg}; +use canvas_traits::CanvasMsg; use dom::bindings::codegen::Bindings::WebGLFramebufferBinding; use dom::bindings::global::GlobalRef; use dom::bindings::js::Root; diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index 3e57bae5a6e..f966e5c35c7 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -4,7 +4,7 @@ use canvas_traits::{CanvasCommonMsg, CanvasMsg}; use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants; -use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{WebGLRenderingContextMethods}; +use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextMethods; use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{self, WebGLContextAttributes}; use dom::bindings::codegen::UnionTypes::ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement; use dom::bindings::conversions::{ToJSValConvertible, array_buffer_view_data, array_buffer_view_data_checked}; diff --git a/components/script/dom/websocket.rs b/components/script/dom/websocket.rs index 39894cbd585..8735394a7a9 100644 --- a/components/script/dom/websocket.rs +++ b/components/script/dom/websocket.rs @@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull; use dom::bindings::codegen::Bindings::WebSocketBinding; use dom::bindings::codegen::Bindings::WebSocketBinding::{BinaryType, WebSocketMethods}; use dom::bindings::codegen::UnionTypes::StringOrStringSequence; -use dom::bindings::conversions::{ToJSValConvertible}; +use dom::bindings::conversions::ToJSValConvertible; use dom::bindings::error::{Error, Fallible, ErrorResult}; use dom::bindings::global::GlobalRef; use dom::bindings::inheritance::Castable; diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 540266b6491..4958116f42d 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -79,7 +79,7 @@ use std::sync::{Arc, Mutex}; use string_cache::Atom; use style::context::ReflowGoal; use style::error_reporting::ParseErrorReporter; -use style::properties::longhands::{overflow_x}; +use style::properties::longhands::overflow_x; use style::selector_impl::PseudoElement; use task_source::TaskSource; use task_source::dom_manipulation::{DOMManipulationTaskSource, DOMManipulationTask}; diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs index 27fe4a783f0..a4b006f2181 100644 --- a/components/script/dom/xmlhttprequest.rs +++ b/components/script/dom/xmlhttprequest.rs @@ -13,7 +13,7 @@ use dom::bindings::codegen::Bindings::XMLHttpRequestBinding; use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::BodyInit; use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestMethods; use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseType; -use dom::bindings::conversions::{ToJSValConvertible}; +use dom::bindings::conversions::ToJSValConvertible; use dom::bindings::error::{Error, ErrorResult, Fallible}; use dom::bindings::global::{GlobalRef, GlobalRoot}; use dom::bindings::inheritance::Castable; diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs index a97bab045a0..7a75a6c846c 100644 --- a/components/script/layout_interface.rs +++ b/components/script/layout_interface.rs @@ -15,8 +15,8 @@ use ipc_channel::ipc::{IpcReceiver, IpcSender}; use msg::constellation_msg::{PanicMsg, PipelineId, WindowSizeData}; use net_traits::image_cache_thread::ImageCacheThread; use profile_traits::mem::ReportsChan; +use script_traits::UntrustedNodeAddress; use script_traits::{ConstellationControlMsg, LayoutControlMsg, LayoutMsg as ConstellationMsg}; -use script_traits::{UntrustedNodeAddress}; use std::sync::Arc; use std::sync::mpsc::{Receiver, Sender, channel}; use string_cache::Atom; diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 8b87dcb2169..5d70af5b059 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -57,7 +57,7 @@ use js::jsapi::{DOMProxyShadowsResult, HandleId, HandleObject, RootedValue}; use js::jsapi::{JSContext, JS_SetWrapObjectCallbacks, JSTracer, SetWindowProxyClass}; use js::jsval::UndefinedValue; use js::rust::Runtime; -use layout_interface::{ReflowQueryType}; +use layout_interface::ReflowQueryType; use layout_interface::{self, LayoutChan, NewLayoutThreadInfo}; use mem::heap_size_of_self_and_children; use msg::constellation_msg::{LoadData, PanicMsg, PipelineId, PipelineNamespace}; diff --git a/components/style/animation.rs b/components/style/animation.rs index 08ae32baf0c..299d1117f6c 100644 --- a/components/style/animation.rs +++ b/components/style/animation.rs @@ -19,8 +19,8 @@ use properties::longhands::transform::computed_value::ComputedOperation as Trans use properties::longhands::transform::computed_value::T as TransformList; use properties::longhands::transition_property; use properties::longhands::transition_property::computed_value::TransitionProperty; -use properties::longhands::transition_timing_function::computed_value::{StartEnd}; -use properties::longhands::transition_timing_function::computed_value::{TransitionTimingFunction}; +use properties::longhands::transition_timing_function::computed_value::StartEnd; +use properties::longhands::transition_timing_function::computed_value::TransitionTimingFunction; use properties::longhands::vertical_align::computed_value::T as VerticalAlign; use properties::longhands::visibility::computed_value::T as Visibility; use properties::longhands::z_index::computed_value::T as ZIndex; diff --git a/components/style/attr.rs b/components/style/attr.rs index 0ba247e101f..8d5777bc34f 100644 --- a/components/style/attr.rs +++ b/components/style/attr.rs @@ -12,7 +12,7 @@ use string_cache::{Atom, Namespace}; use url::Url; use util::str::{LengthOrPercentageOrAuto, HTML_SPACE_CHARACTERS}; use util::str::{read_exponent, read_fraction, read_numbers, split_commas, split_html_space_chars}; -use values::specified::{Length}; +use values::specified::Length; // Duplicated from script::dom::values. const UNSIGNED_LONG_MAX: u32 = 2147483647; diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs index 83771a1b070..0b5865cdb61 100644 --- a/components/webdriver_server/lib.rs +++ b/components/webdriver_server/lib.rs @@ -53,7 +53,7 @@ use webdriver::command::{TimeoutsParameters, WindowSizeParameters}; use webdriver::command::{WebDriverCommand, WebDriverExtensionCommand, WebDriverMessage}; use webdriver::common::{LocatorStrategy, WebElement}; use webdriver::error::{ErrorStatus, WebDriverError, WebDriverResult}; -use webdriver::httpapi::{WebDriverExtensionRoute}; +use webdriver::httpapi::WebDriverExtensionRoute; use webdriver::response::{ElementRectResponse, NewSessionResponse, ValueResponse}; use webdriver::response::{WebDriverResponse, WindowSizeResponse}; use webdriver::server::{self, Session, WebDriverHandler}; diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index b5ca86c4301..0c4a7070823 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -21,7 +21,7 @@ use std::ptr; use std::slice; use std::str::from_utf8_unchecked; use std::sync::{Arc, Mutex}; -use style::context::{ReflowGoal}; +use style::context::ReflowGoal; use style::dom::{TDocument, TElement, TNode}; use style::error_reporting::StdoutErrorReporter; use style::parallel; diff --git a/ports/geckolib/wrapper.rs b/ports/geckolib/wrapper.rs index de1130639f7..63ec923513b 100644 --- a/ports/geckolib/wrapper.rs +++ b/ports/geckolib/wrapper.rs @@ -4,14 +4,16 @@ #![allow(unsafe_code)] -use gecko_bindings::bindings::{Gecko_ChildrenCount}; -use gecko_bindings::bindings::{Gecko_ClassOrClassList}; +use gecko_bindings::bindings::Gecko_ChildrenCount; +use gecko_bindings::bindings::Gecko_ClassOrClassList; +use gecko_bindings::bindings::Gecko_GetElementId; +use gecko_bindings::bindings::Gecko_GetNodeData; +use gecko_bindings::bindings::ServoNodeData; +use gecko_bindings::bindings::nsIAtom; use gecko_bindings::bindings::{Gecko_ElementState, Gecko_GetAttrAsUTF8, Gecko_GetDocumentElement}; -use gecko_bindings::bindings::{Gecko_GetElementId}; use gecko_bindings::bindings::{Gecko_GetFirstChild, Gecko_GetFirstChildElement}; use gecko_bindings::bindings::{Gecko_GetLastChild, Gecko_GetLastChildElement}; use gecko_bindings::bindings::{Gecko_GetNextSibling, Gecko_GetNextSiblingElement}; -use gecko_bindings::bindings::{Gecko_GetNodeData}; use gecko_bindings::bindings::{Gecko_GetParentElement, Gecko_GetParentNode}; use gecko_bindings::bindings::{Gecko_GetPrevSibling, Gecko_GetPrevSiblingElement}; use gecko_bindings::bindings::{Gecko_IsHTMLElementInHTMLDocument, Gecko_IsLink, Gecko_IsRootElement, Gecko_IsTextNode}; @@ -19,8 +21,6 @@ use gecko_bindings::bindings::{Gecko_IsUnvisitedLink, Gecko_IsVisitedLink}; #[allow(unused_imports)] // Used in commented-out code. use gecko_bindings::bindings::{Gecko_LocalName, Gecko_Namespace, Gecko_NodeIsElement, Gecko_SetNodeData}; use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode}; -use gecko_bindings::bindings::{ServoNodeData}; -use gecko_bindings::bindings::{nsIAtom}; use libc::uintptr_t; use properties::GeckoComputedValues; use selector_impl::{GeckoSelectorImpl, NonTSPseudoClass, PrivateStyleData}; @@ -42,9 +42,9 @@ use style::element_state::ElementState; #[allow(unused_imports)] // Used in commented-out code. use style::error_reporting::StdoutErrorReporter; use style::parser::ParserContextExtraData; -use style::properties::{PropertyDeclaration, PropertyDeclarationBlock}; #[allow(unused_imports)] // Used in commented-out code. -use style::properties::{parse_style_attribute}; +use style::properties::parse_style_attribute; +use style::properties::{PropertyDeclaration, PropertyDeclarationBlock}; use style::restyle_hints::ElementSnapshot; use style::selector_impl::ElementExt; #[allow(unused_imports)] // Used in commented-out code. diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs index 131e9ee0823..4d3da2ef176 100644 --- a/ports/glutin/window.rs +++ b/ports/glutin/window.rs @@ -14,10 +14,10 @@ use euclid::{Size2D, Point2D}; #[cfg(target_os = "windows")] use gdi32; use gleam::gl; use glutin; +use glutin::TouchPhase; #[cfg(target_os = "macos")] use glutin::os::macos::{ActivationPolicy, WindowBuilderExt}; use glutin::{Api, ElementState, Event, GlRequest, MouseButton, VirtualKeyCode, MouseScrollDelta}; -use glutin::{TouchPhase}; use layers::geometry::DevicePixel; use layers::platform::surface::NativeDisplay; use msg::constellation_msg::{KeyState, NONE, CONTROL, SHIFT, ALT, SUPER}; diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index 6ec263b2678..fa080890eb9 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -390,6 +390,8 @@ def check_rust(file_name, lines): # No benefit over using &str (r": &String", "use &str instead of &String", no_filter), (r"^&&", "operators should go at the end of the first line", no_filter), + (r"\{[A-Za-z0-9_]+\};", "use statement contains braces for single import", + lambda match, line: line.startswith('use ')), ] for pattern, message, filter_func in regex_rules: diff --git a/python/tidy/servo_tidy_tests/rust_tidy.rs b/python/tidy/servo_tidy_tests/rust_tidy.rs index 92db863dfaa..ef0a53b4b24 100644 --- a/python/tidy/servo_tidy_tests/rust_tidy.rs +++ b/python/tidy/servo_tidy_tests/rust_tidy.rs @@ -7,6 +7,7 @@ use azure::azure_hl::{AntialiasMode, Color, ColorPattern, CompositionOp}; use euclid::size::Size2D; use azure::azure::AzIntSize; +use azure::azure::{AzIntSize}; use std; diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py index 55dbb4ce21a..47c3d7780a3 100644 --- a/python/tidy/servo_tidy_tests/test_tidy.py +++ b/python/tidy/servo_tidy_tests/test_tidy.py @@ -53,6 +53,7 @@ class CheckTidiness(unittest.TestCase): self.assertEqual('use statement spans multiple lines', errors.next()[2]) self.assertEqual('missing space before }', errors.next()[2]) self.assertTrue('use statement is not in alphabetical order' in errors.next()[2]) + self.assertEqual('use statement contains braces for single import', errors.next()[2]) self.assertEqual('encountered whitespace following a use statement', errors.next()[2]) self.assertTrue('mod declaration is not in alphabetical order' in errors.next()[2]) self.assertEqual('mod declaration spans multiple lines', errors.next()[2]) diff --git a/tests/unit/script/dom/blob.rs b/tests/unit/script/dom/blob.rs index 339b1f4ba36..fa670ec28c4 100644 --- a/tests/unit/script/dom/blob.rs +++ b/tests/unit/script/dom/blob.rs @@ -2,7 +2,7 @@ * 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 script::dom::blob::{DataSlice}; +use script::dom::blob::DataSlice; use std::sync::Arc; #[test] diff --git a/tests/unit/style/attr.rs b/tests/unit/style/attr.rs index 19c3ba93312..7b642a5db4a 100644 --- a/tests/unit/style/attr.rs +++ b/tests/unit/style/attr.rs @@ -4,7 +4,7 @@ use app_units::Au; use style::attr::{AttrValue, parse_length}; -use util::str::{LengthOrPercentageOrAuto}; +use util::str::LengthOrPercentageOrAuto; #[test] fn test_parse_double() { |