summary refs log tree commit diff stats
path: root/doc/destructors.rst
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2021-03-12 13:43:40 +0100
committerGitHub <noreply@github.com>2021-03-12 13:43:40 +0100
commitc7e4e96aaf9d5148c4bc44a8c7dc4f462a8f2256 (patch)
treeb17e2c9405b6c7c08b418e4a8caf82a8ef858606 /doc/destructors.rst
parenta0b8a3d920e7d869523b1182e846ae333fcb8844 (diff)
downloadNim-c7e4e96aaf9d5148c4bc44a8c7dc4f462a8f2256.tar.gz
Small fix to destructors example
Diffstat (limited to 'doc/destructors.rst')
-rw-r--r--doc/destructors.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/destructors.rst b/doc/destructors.rst
index ff6ceaf5e..98926435f 100644
--- a/doc/destructors.rst
+++ b/doc/destructors.rst
@@ -37,7 +37,7 @@ written as:
 
   proc `=destroy`*[T](x: var myseq[T]) =
     if x.data != nil:
-      for i in 0..<x.len: `=destroy`(x[i])
+      for i in 0..<x.len: `=destroy`(x.data[i])
       dealloc(x.data)
 
   proc `=copy`*[T](a: var myseq[T]; b: myseq[T]) =