Small fix to destructors example

This commit is contained in:
Clyybber
2021-03-12 13:43:40 +01:00
committed by GitHub
parent a0b8a3d920
commit c7e4e96aaf

View File

@@ -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]) =