Skip to content

Commit 8c1f1de

Browse files
beeth0venkzaher
authored andcommitted
Remove unnecessary in Bag
1 parent d52c3a8 commit 8c1f1de

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Platform/DataStructures/Bag.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,8 @@ struct Bag<T> : CustomDebugStringConvertible {
8383
_pairs.append((key: key, value: element))
8484
return key
8585
}
86-
87-
if _dictionary == nil {
88-
_dictionary = [:]
89-
}
90-
91-
_dictionary![key] = element
86+
87+
_dictionary = [key: element]
9288

9389
return key
9490
}

0 commit comments

Comments
 (0)