Skip to content

Commit e42162e

Browse files
committed
PushToStack can be a single generic method
1 parent bb04060 commit e42162e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/PSTree/Extensions/TreeExtensions.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ internal static void AddToCache<TBase, TLeaf>(this TLeaf leaf, Cache<TBase, TLea
9191
cache.Add(leaf);
9292
}
9393

94-
internal static void PushToStack(this TreeDirectory directory, Stack<TreeDirectory> stack)
94+
internal static void PushToStack<T>(this T directory, Stack<T> stack)
9595
{
9696
stack.Push(directory);
9797
}
@@ -200,13 +200,6 @@ internal static (TreeRegistryKey, RegistryKey) AddParent(
200200
return treeKey;
201201
}
202202

203-
internal static void PushToStack(
204-
this (TreeRegistryKey, RegistryKey) treeKey,
205-
Stack<(TreeRegistryKey, RegistryKey)> stack)
206-
{
207-
stack.Push(treeKey);
208-
}
209-
210203
internal static void Deconstruct(
211204
this string[] strings,
212205
out string baseKey,

0 commit comments

Comments
 (0)