about summary refs log tree commit diff
path: root/LibMatrix/Extensions/DictionaryExtensions.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-08-14 19:46:11 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-08-14 19:46:11 +0200
commitcb8846a7a3310f8513989da5aadb5202f048a1b3 (patch)
treecfbcf2506947d0f820208dd4cdb7a56c660ef0f9 /LibMatrix/Extensions/DictionaryExtensions.cs
parentUpdate dependencies (diff)
downloadLibMatrix-cb8846a7a3310f8513989da5aadb5202f048a1b3.tar.xz
Code cleanup
Diffstat (limited to 'LibMatrix/Extensions/DictionaryExtensions.cs')
-rw-r--r--LibMatrix/Extensions/DictionaryExtensions.cs3
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