Skip to content

Commit

Permalink
Eliminate redundant code in Range.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartdesmet committed Feb 20, 2019
1 parent c4c86aa commit 1144c88
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static IAsyncEnumerable<int> Range(int start, int count)
throw Error.ArgumentOutOfRange(nameof(count));

var end = (long)start + count - 1L;
if (count < 0 || end > int.MaxValue)
if (end > int.MaxValue)
throw Error.ArgumentOutOfRange(nameof(count));

if (count == 0)
Expand Down

0 comments on commit 1144c88

Please sign in to comment.