Small fix to destructors example

This commit is contained in:
Clyybber 2021-03-12 13:43:40 +01:00 • committed by GitHub
commit c7e4e96aaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,7 +37,7 @@ written as:
proc `=destroy`*[T](x: var myseq[T]) = proc `=destroy`*[T](x: var myseq[T]) =
if x.data != nil: 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) dealloc(x.data)
proc `=copy`*[T](a: var myseq[T]; b: myseq[T]) = proc `=copy`*[T](a: var myseq[T]; b: myseq[T]) =