diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-18 15:44:30 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-18 15:44:30 +0530 |
commit | 7a87312121a69b590b364f9b5095f3145554e24b (patch) | |
tree | b90d213147d74d97a79ba65a31394ddc78fec95f /components/script/dom/canvaspattern.rs | |
parent | 247f586284ff3938430fd2be8de2ba2ac82eadc2 (diff) | |
parent | 0c61be7a577b99dc138eb6a2e46fb9276df0870d (diff) | |
download | servo-7a87312121a69b590b364f9b5095f3145554e24b.tar.gz servo-7a87312121a69b590b364f9b5095f3145554e24b.zip |
Auto merge of #8569 - Ms2ger:fmt-script, r=metajack
Rustfmt some of script.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8569)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/canvaspattern.rs')
-rw-r--r-- | components/script/dom/canvaspattern.rs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/components/script/dom/canvaspattern.rs b/components/script/dom/canvaspattern.rs index 2f385be82bf..3eec8beb3bc 100644 --- a/components/script/dom/canvaspattern.rs +++ b/components/script/dom/canvaspattern.rs @@ -21,7 +21,10 @@ pub struct CanvasPattern { } impl CanvasPattern { - fn new_inherited(surface_data: Vec<u8>, surface_size: Size2D<i32>, repeat: RepetitionStyle) -> CanvasPattern { + fn new_inherited(surface_data: Vec<u8>, + surface_size: Size2D<i32>, + repeat: RepetitionStyle) + -> CanvasPattern { let (x, y) = match repeat { RepetitionStyle::Repeat => (true, true), RepetitionStyle::RepeatX => (true, false), @@ -43,13 +46,16 @@ impl CanvasPattern { repeat: RepetitionStyle) -> Root<CanvasPattern> { reflect_dom_object(box CanvasPattern::new_inherited(surface_data, surface_size, repeat), - global, CanvasPatternBinding::Wrap) + global, + CanvasPatternBinding::Wrap) } } impl<'a> ToFillOrStrokeStyle for &'a CanvasPattern { fn to_fill_or_stroke_style(self) -> FillOrStrokeStyle { - FillOrStrokeStyle::Surface( - SurfaceStyle::new(self.surface_data.clone(), self.surface_size, self.repeat_x, self.repeat_y)) + FillOrStrokeStyle::Surface(SurfaceStyle::new(self.surface_data.clone(), + self.surface_size, + self.repeat_x, + self.repeat_y)) } } |