Remove CollectionExtensions.Deconstruct

Long live KeyValuePair<,>.Deconstruct
This commit is contained in:
Pieter-Jan Briers
2020-07-20 01:03:30 +02:00
parent 449ed4ad7c
commit 808bbeb71c

View File

@@ -54,13 +54,6 @@ namespace Robust.Shared.Utility
return old;
}
// So you can do foreach (var (key, value) in dict)
// This basically re-implements the CoreFX version because we're using a pretty old version of .NET Framework.
// https://github.com/dotnet/roslyn/issues/20393
public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> k, out TKey t, out TValue u) {
t = k.Key; u = k.Value;
}
/// <summary>
/// Pop an element from the end of a list, removing it from the list and returning it.
/// </summary>