summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/std/channels.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/std/channels.nim b/lib/std/channels.nim
index 1b0844c48..383a58dda 100644
--- a/lib/std/channels.nim
+++ b/lib/std/channels.nim
@@ -456,7 +456,8 @@ proc `=`*[T](dest: var Channel[T], src: Channel[T]) =
 proc channelSend[T](chan: Channel[T], data: sink T, size: int, nonBlocking: bool): bool {.inline.} =
   ## Send item to the channel (FIFO queue)
   ## (Insert at last)
-  sendMpmc(chan.d, data.unsafeAddr, size, nonBlocking)
+  result = sendMpmc(chan.d, data.unsafeAddr, size, nonBlocking)
+  wasMoved(data)
 
 proc channelReceive[T](chan: Channel[T], data: ptr T, size: int, nonBlocking: bool): bool {.inline.} =
   ## Receive an item from the channel