瀏覽代碼

Fix `core:sync/chan` for rand

gingerBill 1 年之前
父節點
當前提交
2380720fa2
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      core/sync/chan/chan.odin

+ 1 - 4
core/sync/chan/chan.odin

@@ -476,10 +476,7 @@ select_raw :: proc "odin" (recvs: []^Raw_Chan, sends: []^Raw_Chan, send_msgs: []
 		return
 		return
 	}
 	}
 
 
-	r: ^rand.Rand = nil
-
-
-	select_idx = rand.int_max(count, r) if count > 0 else 0
+	select_idx = rand.int_max(count) if count > 0 else 0
 
 
 	sel := candidates[select_idx]
 	sel := candidates[select_idx]
 	if sel.is_recv {
 	if sel.is_recv {