Skip to content

Commit

Permalink
Fix Order{,Descending} preventing GitLab CI from building tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiRulz committed Dec 11, 2024
1 parent 2b71ff9 commit 56e5105
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/BizHawk.Common/Extensions/CollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ public static int IndexOf<T>(this IReadOnlyList<T> list, T elem)
return null;
}

#if !NET7_0_OR_GREATER
/// <remarks>shorthand for <c>this.OrderBy(static e => e)</c>, backported from .NET 7</remarks>
public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source)
where T : IComparable<T>
Expand All @@ -243,6 +244,7 @@ public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source)
public static IOrderedEnumerable<T> OrderDescending<T>(this IEnumerable<T> source)
where T : IComparable<T>
=> source.OrderByDescending(ReturnSelf);
#endif

/// <inheritdoc cref="List{T}.RemoveAll"/>
/// <remarks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using System.Collections.Generic;
using System.Linq;

#if !NET7_0_OR_GREATER
using BizHawk.Common.CollectionExtensions;
#endif
using BizHawk.Common.StringExtensions;
using BizHawk.Emulation.Common;

Expand Down

0 comments on commit 56e5105

Please sign in to comment.