summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorflywind <xzsflywind@gmail.com>2021-03-03 08:08:52 +0800
committerGitHub <noreply@github.com>2021-03-03 08:08:52 +0800
commita04c9d1f6215a52c89e1e641ea2afcf4ce2a90de (patch)
treecb61282b6661ef2c7872247edde5e8c1143b045a /doc
parent87897fa2d6b5c256606f05af2d0fd74643cce542 (diff)
downloadNim-a04c9d1f6215a52c89e1e641ea2afcf4ce2a90de.tar.gz
rename prepareStrMutation to prepareMutation (#17235)
* remove unnecessary when statement

* remove outdated codes

* rename prepareStrMutation to prepareMutation
Diffstat (limited to 'doc')
-rw-r--r--doc/destructors.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/destructors.rst b/doc/destructors.rst
index 3c50241eb..ff6ceaf5e 100644
--- a/doc/destructors.rst
+++ b/doc/destructors.rst
@@ -676,25 +676,25 @@ moveMem(addr y[0], addr x[0], 3)
 ```
 
 The program fails because we need to prepare a fresh copy for the variable `y`.
-`prepareStrMutation` should be called before the address operation.
+`prepareMutation` should be called before the address operation.
 
 ```nim
 var x = "abc"
 var y = x
 
-prepareStrMutation(y)
+prepareMutation(y)
 moveMem(addr y[0], addr x[0], 3)
 assert y == "abc"
 ```
 
-Now `prepareStrMutation` solves the problem.
+Now `prepareMutation` solves the problem.
 It manually creates a fresh copy and makes the variable `y` mutable.
 
 ```nim
 var x = "abc"
 var y = x
 
-prepareStrMutation(y)
+prepareMutation(y)
 moveMem(addr y[0], addr x[0], 3)
 moveMem(addr y[0], addr x[0], 3)
 moveMem(addr y[0], addr x[0], 3)