From 12593c8ea8e58514181a9d6d362f8dc871b08c6e Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Tue, 12 Jul 2016 21:33:50 -0700 Subject: [PATCH] Rustfmt on xy.rs --- src/xy.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/xy.rs b/src/xy.rs index e3cab3e..79bc264 100644 --- a/src/xy.rs +++ b/src/xy.rs @@ -9,13 +9,10 @@ pub struct XY { pub y: T, } -impl XY { +impl XY { /// Creates a new `XY` from the given values. pub fn new(x: T, y: T) -> Self { - XY { - x: x, - y: y, - } + XY { x: x, y: y } } /// Destructure self into a pair. @@ -34,14 +31,14 @@ impl XY { } } -impl XY { +impl XY { /// Creates a `XY` with both `x` and `y` set to `value`. pub fn both(value: T) -> Self { XY::new(value, value) } } -impl From<(T, T)> for XY { +impl From<(T, T)> for XY { fn from((x, y): (T, T)) -> Self { XY::new(x, y) }