about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--aoc2021/Day01.cs10
-rw-r--r--aoc2021/DayXX.cs.txt10
-rw-r--r--aoc2021/Extensions.cs12
3 files changed, 8 insertions, 24 deletions
diff --git a/aoc2021/Day01.cs b/aoc2021/Day01.cs
index 2dc1d33..22fdced 100644
--- a/aoc2021/Day01.cs
+++ b/aoc2021/Day01.cs
@@ -9,13 +9,7 @@ public sealed class Day01 : Day
     {
     }
 
-    public override string Part1()
-    {
-        return "";
-    }
+    public override string Part1() => "";
 
-    public override string Part2()
-    {
-        return "";
-    }
+    public override string Part2() => "";
 }
diff --git a/aoc2021/DayXX.cs.txt b/aoc2021/DayXX.cs.txt
index 20a578a..d9fc52a 100644
--- a/aoc2021/DayXX.cs.txt
+++ b/aoc2021/DayXX.cs.txt
@@ -9,13 +9,7 @@ public sealed class DayXX : Day
     {
     }
 
-    public override string Part1()
-    {
-        return "";
-    }
+    public override string Part1() => "";
 
-    public override string Part2()
-    {
-        return "";
-    }
+    public override string Part2() => "";
 }
diff --git a/aoc2021/Extensions.cs b/aoc2021/Extensions.cs
index 268d6a9..44202c4 100644
--- a/aoc2021/Extensions.cs
+++ b/aoc2021/Extensions.cs
@@ -12,10 +12,8 @@ public static class Extensions
     /// </summary>
     /// <param name="stopwatch"></param>
     /// <returns></returns>
-    public static double ScaleMilliseconds(this Stopwatch stopwatch)
-    {
-        return 1_000 * stopwatch.ElapsedTicks / (double)Stopwatch.Frequency;
-    }
+    public static double ScaleMilliseconds(this Stopwatch stopwatch) =>
+        1_000 * stopwatch.ElapsedTicks / (double)Stopwatch.Frequency;
 
     /// <summary>
     /// Does a <see cref="Range"/> include a given int?
@@ -23,8 +21,6 @@ public static class Extensions
     /// <param name="range"></param>
     /// <param name="i"></param>
     /// <returns></returns>
-    public static bool Contains(this Range range, int i)
-    {
-        return i >= range.Start.Value && i <= range.End.Value;
-    }
+    public static bool Contains(this Range range, int i) =>
+        i >= range.Start.Value && i <= range.End.Value;
 }