From 383bd7b147a640c72a4dcdef7a80deec031c7734 Mon Sep 17 00:00:00 2001 From: Jason Nelson Date: Mon, 27 Aug 2018 08:06:05 -0700 Subject: [PATCH] [SL.Core] Format Rectangle --- src/SixLabors.Core/Primitives/Rectangle.cs | 23 ++++++---------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/SixLabors.Core/Primitives/Rectangle.cs b/src/SixLabors.Core/Primitives/Rectangle.cs index 5b4ac10a7..2c9eec269 100644 --- a/src/SixLabors.Core/Primitives/Rectangle.cs +++ b/src/SixLabors.Core/Primitives/Rectangle.cs @@ -120,10 +120,7 @@ namespace SixLabors.Primitives public int Top { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return this.Y; - } + get => this.Y; } /// @@ -132,10 +129,7 @@ namespace SixLabors.Primitives public int Right { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return unchecked(this.X + this.Width); - } + get => unchecked(this.X + this.Width); } /// @@ -144,10 +138,8 @@ namespace SixLabors.Primitives public int Bottom { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return unchecked(this.Y + this.Height); - } + get => unchecked(this.Y + this.Height); + } /// @@ -156,10 +148,7 @@ namespace SixLabors.Primitives public int Left { [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return this.X; - } + get => this.X; } /// @@ -459,7 +448,7 @@ namespace SixLabors.Primitives } /// - public override bool Equals(object obj) => obj is Rectangle && this.Equals((Rectangle)obj); + public override bool Equals(object obj) => obj is Rectangle other && this.Equals(other); /// [MethodImpl(MethodImplOptions.AggressiveInlining)]