-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace Moq.Analyzers.Common; | ||
namespace Moq.Analyzers.Common; | ||
|
||
internal static class EnumerableExtensions | ||
{ | ||
|
@@ -19,7 +17,6 @@ internal static class EnumerableExtensions | |
/// <inheritdoc cref="DefaultIfNotSingle{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> | ||
/// <param name="source">The collection to enumerate.</param> | ||
/// <param name="predicate">A function to test each element for a condition.</param> | ||
[SuppressMessage("Performance", "ECS0900:Minimize boxing and unboxing", Justification = "Should revisit. Suppressing for now to unblock refactor.")] | ||
public static TSource? DefaultIfNotSingle<TSource>(this ImmutableArray<TSource> source, Func<TSource, bool> predicate) | ||
{ | ||
return source.AsEnumerable().DefaultIfNotSingle(predicate); | ||
Check failure on line 22 in src/Common/EnumerableExtensions.cs GitHub Actions / build (windows-latest)
Check failure on line 22 in src/Common/EnumerableExtensions.cs GitHub Actions / build (windows-latest)
Check failure on line 22 in src/Common/EnumerableExtensions.cs GitHub Actions / build (windows-latest)
Check failure on line 22 in src/Common/EnumerableExtensions.cs GitHub Actions / build (windows-latest)
Check failure on line 22 in src/Common/EnumerableExtensions.cs GitHub Actions / build (ubuntu-latest)
Check failure on line 22 in src/Common/EnumerableExtensions.cs GitHub Actions / build (ubuntu-latest)
Check failure on line 22 in src/Common/EnumerableExtensions.cs GitHub Actions / build (ubuntu-latest)
Check failure on line 22 in src/Common/EnumerableExtensions.cs GitHub Actions / build (ubuntu-latest)
|
||
|