1 files changed, 1 insertions, 2 deletions
diff --git a/LibMatrix/Extensions/DictionaryExtensions.cs b/LibMatrix/Extensions/DictionaryExtensions.cs
index fbc5cf5..f01cf68 100644
--- a/LibMatrix/Extensions/DictionaryExtensions.cs
+++ b/LibMatrix/Extensions/DictionaryExtensions.cs
@@ -3,8 +3,7 @@ namespace LibMatrix.Extensions;
public static class DictionaryExtensions {
public static bool ChangeKey<TKey, TValue>(this IDictionary<TKey, TValue> dict,
TKey oldKey, TKey newKey) {
- TValue value;
- if (!dict.Remove(oldKey, out value))
+ if (!dict.Remove(oldKey, out var value))
return false;
dict[newKey] = value; // or dict.Add(newKey, value) depending on ur comfort
|