Skip to content

Commit

Permalink
Address CA1859 warning (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin authored Aug 17, 2023
1 parent 69c48aa commit d72dcbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Source/SuperLinq/Permutations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ private void NextPermutation()
/// same.
/// </remarks>
/// <returns>List of permuted source sequence values</returns>
private IList<T> PermuteValueSet()
private T[] PermuteValueSet()
{
var permutedSet = new T[_permutation.Length];
for (var i = 0; i < _permutation.Length; i++)
Expand Down
8 changes: 4 additions & 4 deletions Tests/SuperLinq.Test/CopyToTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ public void ThrowsOnTooMuchDataForArray()
[Fact]
public void ThrowsOnTooMuchDataForIListArray()
{
_ = Assert.Throws<ArgumentException>(
_ = Assert.ThrowsAny<ArgumentException>(
() => Seq(1).CopyTo((IList<int>)Array.Empty<int>()));
_ = Assert.Throws<ArgumentException>(
_ = Assert.ThrowsAny<ArgumentException>(
() => Enumerable.Range(1, 1).CopyTo((IList<int>)Array.Empty<int>()));
_ = Assert.Throws<ArgumentException>(
_ = Assert.ThrowsAny<ArgumentException>(
() => new List<int> { 1 }.AsEnumerable().CopyTo((IList<int>)Array.Empty<int>()));
_ = Assert.Throws<ArgumentException>(
_ = Assert.ThrowsAny<ArgumentException>(
() => new List<int> { 1 }.AsReadOnly().AsEnumerable().CopyTo((IList<int>)Array.Empty<int>()));
}

Expand Down

0 comments on commit d72dcbc

Please sign in to comment.