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) }