summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/random.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/random.nim b/lib/pure/random.nim
index 6a5f35bde..07db0365c 100644
--- a/lib/pure/random.nim
+++ b/lib/pure/random.nim
@@ -410,7 +410,7 @@ proc sample*[T](r: var Rand; a: openArray[T]): T =
 
   result = a[r.rand(a.low..a.high)]
 
-proc sample*[T](a: openArray[T]): T =
+proc sample*[T](a: openArray[T]): lent T =
   ## Returns a random element from `a`.
   ##
   ## If `randomize <#randomize>`_ has not been called, the order of outcomes