Skip to content

Commit 4ac12f6

Browse files
authored
Merge pull request #1080 from daerich/array-typo
array-expr.md: fix typo; 'polish' sentence
2 parents 3b7be07 + 9dd6a1f commit 4ac12f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/expressions/array-expr.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The syntax for the second form is two expressions separated by a semicolon (`;`)
2121
The expression before the `;` is called the *repeat operand*.
2222
The expression after the `;` is called the *length operand*.
2323
It must have type `usize` and be a [constant expression], such as a [literal] or a [constant item].
24-
An array expression of this form creates an array with the length of the value of the legnth operand with each element a copy of the repeat operand.
24+
An array expression of this form creates an array with the length of the value of the length operand with each element being a copy of the repeat operand.
2525
That is, `[a; b]` creates an array containing `b` copies of the value of `a`.
2626
If the length operand has a value greater than 1 then this requires that the type of the repeat operand is [`Copy`] or that it must be a [path] to a constant item.
2727

0 commit comments

Comments
 (0)