diff options
author | Zahary Karadjov <zahary@gmail.com> | 2020-03-29 02:17:47 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2020-04-01 19:38:44 +0200 |
commit | 0521f98486a6a95b388864747d584ddd5bf68391 (patch) | |
tree | bc9238c0bcc6edf0ba6b94b510c1ce65cb663454 /lib/pure/ioselects/ioselectors_epoll.nim | |
parent | f3be5a716fff715bd46f6f0293db04eb2f0f832d (diff) | |
download | Nim-0521f98486a6a95b388864747d584ddd5bf68391.tar.gz |
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.
Diffstat (limited to 'lib/pure/ioselects/ioselectors_epoll.nim')
-rw-r--r-- | lib/pure/ioselects/ioselectors_epoll.nim | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/pure/ioselects/ioselectors_epoll.nim b/lib/pure/ioselects/ioselectors_epoll.nim index bf13cc83e..002bddac5 100644 --- a/lib/pure/ioselects/ioselectors_epoll.nim +++ b/lib/pure/ioselects/ioselectors_epoll.nim @@ -502,8 +502,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) |