Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit c6db4b4

Browse files
committed
Move ToHashSet to ServiceStack.Extensions
1 parent c4bbb23 commit c6db4b4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ServiceStack.Text/Extensions/ServiceStackExtensions.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections.Generic;
23

34
namespace ServiceStack.Extensions
45
{
@@ -8,7 +9,6 @@ namespace ServiceStack.Extensions
89
public static class ServiceStackExtensions
910
{
1011
//Ambiguous definitions in .NET Core 3.0 System MemoryExtensions.cs
11-
1212
public static ReadOnlyMemory<char> Trim(this ReadOnlyMemory<char> span)
1313
{
1414
return span.TrimStart().TrimEnd();
@@ -39,6 +39,8 @@ public static ReadOnlyMemory<char> TrimEnd(this ReadOnlyMemory<char> value)
3939
}
4040
return value.Slice(0, end + 1);
4141
}
42-
42+
43+
// Ambiguous with System.Linq v4.7.2
44+
public static HashSet<T> ToHashSet<T>(this IEnumerable<T> items) => new HashSet<T>(items);
4345
}
4446
}

0 commit comments

Comments
 (0)