diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/gfx/text/shaping/harfbuzz.rs | 4 | ||||
-rw-r--r-- | components/plugins/utils.rs | 4 | ||||
-rw-r--r-- | components/script/dom/element.rs | 4 | ||||
-rw-r--r-- | components/script/dom/htmlcollection.rs | 2 | ||||
-rw-r--r-- | components/script/dom/progressevent.rs | 6 | ||||
-rw-r--r-- | components/script/dom/testbindingproxy.rs | 14 | ||||
-rw-r--r-- | components/script/dom/xmlhttprequest.rs | 2 | ||||
-rw-r--r-- | components/script/timers.rs | 4 |
8 files changed, 20 insertions, 20 deletions
diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs index 462d5bf485c..426068a4106 100644 --- a/components/gfx/text/shaping/harfbuzz.rs +++ b/components/gfx/text/shaping/harfbuzz.rs @@ -576,13 +576,13 @@ extern fn glyph_h_advance_func(_: *mut hb_font_t, fn glyph_space_advance(font: *mut Font) -> f64 { let space_unicode = ' '; let space_glyph: hb_codepoint_t; - match unsafe {(*font).glyph_index(space_unicode)} { + match unsafe { (*font).glyph_index(space_unicode) } { Some(g) => { space_glyph = g as hb_codepoint_t; } None => panic!("No space info") } - let space_advance = unsafe {(*font).glyph_h_advance(space_glyph as GlyphId)}; + let space_advance = unsafe { (*font).glyph_h_advance(space_glyph as GlyphId) }; space_advance } diff --git a/components/plugins/utils.rs b/components/plugins/utils.rs index 79025c33f70..e26cc4bc7cd 100644 --- a/components/plugins/utils.rs +++ b/components/plugins/utils.rs @@ -17,14 +17,14 @@ use syntax::ptr::P; /// Try not to use this for types defined in crates you own, use match_lang_ty instead (for lint passes) pub fn match_ty_unwrap<'a>(ty: &'a Ty, segments: &[&str]) -> Option<&'a [P<Ty>]> { match ty.node { - TyPath(_, Path {segments: ref seg, ..}) => { + TyPath(_, Path { segments: ref seg, .. }) => { // So ast::Path isn't the full path, just the tokens that were provided. // I could muck around with the maps and find the full path // however the more efficient way is to simply reverse the iterators and zip them // which will compare them in reverse until one of them runs out of segments if seg.iter().rev().zip(segments.iter().rev()).all(|(a, b)| a.identifier.name.as_str() == *b) { match seg.last() { - Some(&PathSegment {parameters: AngleBracketedParameters(ref a), ..}) => { + Some(&PathSegment { parameters: AngleBracketedParameters(ref a), .. }) => { Some(&a.types) } _ => None diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 83b7c24ed3a..4e03dff4086 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -1867,10 +1867,10 @@ impl Element { } } // Step 6 - None => {event.fire(target);} + None => { event.fire(target); } }, // Step 6 - None => {event.fire(target);} + None => { event.fire(target); } } // Step 7 self.set_click_in_progress(false); diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs index 6aee8645ad8..ad16e70afa2 100644 --- a/components/script/dom/htmlcollection.rs +++ b/components/script/dom/htmlcollection.rs @@ -64,7 +64,7 @@ impl HTMLCollection { } } } - let filter = AllElementFilter {namespace_filter: namespace_filter}; + let filter = AllElementFilter { namespace_filter: namespace_filter }; HTMLCollection::create(window, root, box filter) } diff --git a/components/script/dom/progressevent.rs b/components/script/dom/progressevent.rs index 88a369606ae..b715330edae 100644 --- a/components/script/dom/progressevent.rs +++ b/components/script/dom/progressevent.rs @@ -52,9 +52,9 @@ impl ProgressEvent { type_: DOMString, init: &ProgressEventBinding::ProgressEventInit) -> Fallible<Root<ProgressEvent>> { - let bubbles = if init.parent.bubbles {EventBubbles::Bubbles} else {EventBubbles::DoesNotBubble}; - let cancelable = if init.parent.cancelable {EventCancelable::Cancelable} - else {EventCancelable::NotCancelable}; + let bubbles = if init.parent.bubbles { EventBubbles::Bubbles } else { EventBubbles::DoesNotBubble }; + let cancelable = if init.parent.cancelable { EventCancelable::Cancelable } + else { EventCancelable::NotCancelable }; let ev = ProgressEvent::new(global, type_, bubbles, cancelable, init.lengthComputable, init.loaded, init.total); Ok(ev) diff --git a/components/script/dom/testbindingproxy.rs b/components/script/dom/testbindingproxy.rs index 3c1f23c8ae1..5ca27eae735 100644 --- a/components/script/dom/testbindingproxy.rs +++ b/components/script/dom/testbindingproxy.rs @@ -15,20 +15,20 @@ pub struct TestBindingProxy { } impl TestBindingProxyMethods for TestBindingProxy { - fn Length(&self) -> u32 {0} - fn SupportedPropertyNames(&self) -> Vec<DOMString> {vec![]} - fn GetNamedItem(&self, _: DOMString) -> DOMString {"".to_owned()} + fn Length(&self) -> u32 { 0 } + fn SupportedPropertyNames(&self) -> Vec<DOMString> { vec![] } + fn GetNamedItem(&self, _: DOMString) -> DOMString { "".to_owned() } fn SetNamedItem(&self, _: DOMString, _: DOMString) -> () {} - fn GetItem(&self, _: u32) -> DOMString {"".to_owned()} + fn GetItem(&self, _: u32) -> DOMString { "".to_owned() } fn SetItem(&self, _: u32, _: DOMString) -> () {} fn RemoveItem(&self, _: DOMString) -> () {} - fn Stringifier(&self) -> DOMString {"".to_owned()} + fn Stringifier(&self) -> DOMString { "".to_owned() } fn NamedCreator(&self, _: DOMString, _: DOMString) -> () {} - fn IndexedGetter(&self, _: u32, _: &mut bool) -> DOMString {"".to_owned()} + fn IndexedGetter(&self, _: u32, _: &mut bool) -> DOMString { "".to_owned() } fn NamedDeleter(&self, _: DOMString) -> () {} fn IndexedSetter(&self, _: u32, _: DOMString) -> () {} fn NamedSetter(&self, _: DOMString, _: DOMString) -> () {} fn IndexedCreator(&self, _: u32, _: DOMString) -> () {} - fn NamedGetter(&self, _: DOMString, _: &mut bool) -> DOMString {"".to_owned()} + fn NamedGetter(&self, _: DOMString, _: &mut bool) -> DOMString { "".to_owned() } } diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs index 1d7a097fd9e..0f08ef9ec11 100644 --- a/components/script/dom/xmlhttprequest.rs +++ b/components/script/dom/xmlhttprequest.rs @@ -959,7 +959,7 @@ impl XMLHttpRequest { fn dispatch_response_progress_event(&self, type_: DOMString) { let len = self.response.borrow().len() as u64; - let total = self.response_headers.borrow().get::<ContentLength>().map(|x| {**x as u64}); + let total = self.response_headers.borrow().get::<ContentLength>().map(|x| { **x as u64 }); self.dispatch_progress_event(false, type_, len, total); } fn set_timeout(&self, duration_ms: u32) { diff --git a/components/script/timers.rs b/components/script/timers.rs index f18b2231417..8fd712e7ac6 100644 --- a/components/script/timers.rs +++ b/components/script/timers.rs @@ -183,7 +183,7 @@ impl TimerManager { if is_interval == IsInterval::NonInterval { break; } - } else if id == control_handle.id() {; + } else if id == control_handle.id() { match control_port.recv().unwrap() { TimerControlMsg::Suspend => { let msg = control_port.recv().unwrap(); @@ -194,7 +194,7 @@ impl TimerManager { break; }, } - }, + }, TimerControlMsg::Resume => panic!("Nothing to resume!"), TimerControlMsg::Cancel => { break; |