switch to expression body for simple methods
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Ben Harris 2021-11-12 17:34:25 -05:00
parent 26b2bc73c7
commit dd34b55e0c
3 changed files with 8 additions and 24 deletions

View File

@ -9,13 +9,7 @@ public sealed class Day01 : Day
{ {
} }
public override string Part1() public override string Part1() => "";
{
return "";
}
public override string Part2() public override string Part2() => "";
{
return "";
}
} }

View File

@ -9,13 +9,7 @@ public sealed class DayXX : Day
{ {
} }
public override string Part1() public override string Part1() => "";
{
return "";
}
public override string Part2() public override string Part2() => "";
{
return "";
}
} }

View File

@ -12,10 +12,8 @@ public static class Extensions
/// </summary> /// </summary>
/// <param name="stopwatch"></param> /// <param name="stopwatch"></param>
/// <returns></returns> /// <returns></returns>
public static double ScaleMilliseconds(this Stopwatch stopwatch) public static double ScaleMilliseconds(this Stopwatch stopwatch) =>
{ 1_000 * stopwatch.ElapsedTicks / (double)Stopwatch.Frequency;
return 1_000 * stopwatch.ElapsedTicks / (double)Stopwatch.Frequency;
}
/// <summary> /// <summary>
/// Does a <see cref="Range"/> include a given int? /// Does a <see cref="Range"/> include a given int?
@ -23,8 +21,6 @@ public static class Extensions
/// <param name="range"></param> /// <param name="range"></param>
/// <param name="i"></param> /// <param name="i"></param>
/// <returns></returns> /// <returns></returns>
public static bool Contains(this Range range, int i) public static bool Contains(this Range range, int i) =>
{ i >= range.Start.Value && i <= range.End.Value;
return i >= range.Start.Value && i <= range.End.Value;
}
} }