all: clean up code with Go 1.24+ in mind (#5489)

* all: clean up code with Go 1.24+ in mind

* all: more old go cleanup

* all: even remove rand_fastrand64

* runtime: revert rand changes

* runtime: re-drop rand_fastrand64
This commit is contained in:
Jake Bailey
2026-07-03 10:10:55 -07:00
committed by GitHub
parent bf80e9b446
commit e79edb58b2
19 changed files with 78 additions and 271 deletions
+6
View File
@@ -71,6 +71,12 @@ func (m *Map) Range(f func(key, value interface{}) bool) {
}
}
func (m *Map) Clear() {
m.lock.Lock()
defer m.lock.Unlock()
clear(m.m)
}
// Swap replaces the value for the given key, and returns the old value if any.
func (m *Map) Swap(key, value any) (previous any, loaded bool) {
m.lock.Lock()