File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ func (m *Map[K, V]) Delete(key K) bool {
5858 return exists
5959}
6060
61- func (m * Map [K , V ]) Size () int {
61+ func (m * Map [K , V ]) Len () int {
6262 return int (m .size .Load ())
6363}
6464
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ func TestMap(t *testing.T) {
4242 2 : "two" ,
4343 3 : "three" ,
4444 }
45- require .Equal (t , 2 , m .Size ())
45+ require .Equal (t , 2 , m .Len ())
4646 var unexp map [int ]string
4747 m .Range (func (key int , value string ) bool {
4848 if v , ok := exp [key ]; ok && v == value {
@@ -56,7 +56,7 @@ func TestMap(t *testing.T) {
5656 require .Empty (t , exp )
5757 require .Empty (t , unexp )
5858 m .Clear ()
59- require .Zero (t , m .Size ())
59+ require .Zero (t , m .Len ())
6060 empty := true
6161 m .Range (func (key int , value string ) bool {
6262 empty = false
You can’t perform that action at this time.
0 commit comments