diff options
author | Ms2ger <Ms2ger@gmail.com> | 2015-11-17 16:52:17 +0100 |
---|---|---|
committer | Ms2ger <Ms2ger@gmail.com> | 2015-11-18 11:14:05 +0100 |
commit | 0c61be7a577b99dc138eb6a2e46fb9276df0870d (patch) | |
tree | 8188a7ed8f86ce1fab95f7aa4ff5c43819e4520d /components/script/dom/canvaspattern.rs | |
parent | ceb72e54e469bb3811fb641e7c38f476781a5720 (diff) | |
download | servo-0c61be7a577b99dc138eb6a2e46fb9276df0870d.tar.gz servo-0c61be7a577b99dc138eb6a2e46fb9276df0870d.zip |
Rustfmt some of script.
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)) } } |