Explorar el Código

Merge pull request #1120 from blink1073/array-pattern

Update patterns tutorial
Afshin Darian hace 8 años
padre
commit
bbbacc9f29
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      tutorial/patterns.md

+ 2 - 1
tutorial/patterns.md

@@ -106,7 +106,8 @@ Prefer an `Array` for:
 - A return value is the result of a newly allocated array, to avoid the 
 extra allocation of an iterator.  
 - A signal payload.
-- A public attribute that is inherently static.
+- A public attribute that is inherently static.  Use `.slice()` to
+make sure the internal value cannot be mutated by the consumer.
 
 Prefer an `IIterator` for:
 - A return value where the value is based on an internal `Vector` but the