| ... | ... | @@ -112,12 +112,10 @@ pub fn ArrayHashMap( |
| 112 | 112 | return self.unmanaged.clearAndFree(self.allocator); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | | /// Deprecated. Use `items().len`. |
| 116 | 115 | pub fn count(self: Self) usize { |
| 117 | | return self.items().len; |
| 116 | return self.unmanaged.count(); |
| 118 | 117 | } |
| 119 | 118 | |
| 120 | | /// Deprecated. Iterate using `items`. |
| 121 | 119 | pub fn iterator(self: *const Self) Iterator { |
| 122 | 120 | return Iterator{ |
| 123 | 121 | .hm = self, |
| ... | ... | @@ -332,6 +330,10 @@ pub fn ArrayHashMapUnmanaged( |
| 332 | 330 | } |
| 333 | 331 | } |
| 334 | 332 | |
| 333 | pub fn count(self: Self) usize { |
| 334 | return self.entries.items.len; |
| 335 | } |
| 336 | |
| 335 | 337 | /// If key exists this function cannot fail. |
| 336 | 338 | /// If there is an existing item with `key`, then the result |
| 337 | 339 | /// `Entry` pointer points to it, and found_existing is true. |