Hrm, the new errors highlighted some code that seems to be broken
New issue: since `Table[A, B]` allocates its backing storage with `newSeq[KeyValuePair[A, B]]`, it's no longer legal to create a table with `not nil` types used as either keys or values.
This commit is contained in:
parent
f3be5a716f
commit
0521f98486
8 changed files with 23 additions and 22 deletions
|
|
@ -600,8 +600,7 @@ proc contains*[T](s: Selector[T], fd: SocketHandle|int): bool {.inline.} =
|
|||
proc getData*[T](s: Selector[T], fd: SocketHandle|int): var T =
|
||||
let fdi = int(fd)
|
||||
s.checkFd(fdi)
|
||||
if fdi in s:
|
||||
result = s.fds[fdi].data
|
||||
result = s.fds[fdi].data
|
||||
|
||||
proc setData*[T](s: Selector[T], fd: SocketHandle|int, data: T): bool =
|
||||
let fdi = int(fd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue