diff options
Diffstat (limited to 'components/script/dom/touchlist.rs')
-rw-r--r-- | components/script/dom/touchlist.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/components/script/dom/touchlist.rs b/components/script/dom/touchlist.rs index 832d45baaeb..ae9de896113 100644 --- a/components/script/dom/touchlist.rs +++ b/components/script/dom/touchlist.rs @@ -25,8 +25,11 @@ impl TouchList { } pub fn new(window: &Window, touches: &[&Touch]) -> DomRoot<TouchList> { - reflect_dom_object(Box::new(TouchList::new_inherited(touches)), - window, TouchListBinding::Wrap) + reflect_dom_object( + Box::new(TouchList::new_inherited(touches)), + window, + TouchListBinding::Wrap, + ) } } @@ -38,7 +41,9 @@ impl TouchListMethods for TouchList { /// <https://w3c.github.io/touch-events/#widl-TouchList-item-getter-Touch-unsigned-long-index> fn Item(&self, index: u32) -> Option<DomRoot<Touch>> { - self.touches.get(index as usize).map(|js| DomRoot::from_ref(&**js)) + self.touches + .get(index as usize) + .map(|js| DomRoot::from_ref(&**js)) } /// <https://w3c.github.io/touch-events/#widl-TouchList-item-getter-Touch-unsigned-long-index> |