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()
{
return "";
}
public override string Part1() => "";
public override string Part2()
{
return "";
}
public override string Part2() => "";
}

View File

@ -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() => "";
}

View File

@ -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;
}