Skip to content

Commit 45df31c

Browse files
MozirDmitriyernestognwAmxx
authored
chore: fix typos (#6108)
Co-authored-by: Ernesto García <[email protected]> Co-authored-by: Hadrien Croubois <[email protected]>
1 parent c2ae6af commit 45df31c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

contracts/utils/Arrays.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ library Arrays {
681681
/**
682682
* @dev Helper to set the length of a dynamic array. Directly writing to `.length` is forbidden.
683683
*
684-
* WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
684+
* WARNING: this does not clear elements if length is reduced, or initialize elements if length is increased.
685685
*/
686686
function unsafeSetLength(address[] storage array, uint256 len) internal {
687687
assembly ("memory-safe") {
@@ -692,7 +692,7 @@ library Arrays {
692692
/**
693693
* @dev Helper to set the length of a dynamic array. Directly writing to `.length` is forbidden.
694694
*
695-
* WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
695+
* WARNING: this does not clear elements if length is reduced, or initialize elements if length is increased.
696696
*/
697697
function unsafeSetLength(bytes32[] storage array, uint256 len) internal {
698698
assembly ("memory-safe") {
@@ -703,7 +703,7 @@ library Arrays {
703703
/**
704704
* @dev Helper to set the length of a dynamic array. Directly writing to `.length` is forbidden.
705705
*
706-
* WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
706+
* WARNING: this does not clear elements if length is reduced, or initialize elements if length is increased.
707707
*/
708708
function unsafeSetLength(uint256[] storage array, uint256 len) internal {
709709
assembly ("memory-safe") {
@@ -714,7 +714,7 @@ library Arrays {
714714
/**
715715
* @dev Helper to set the length of a dynamic array. Directly writing to `.length` is forbidden.
716716
*
717-
* WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
717+
* WARNING: this does not clear elements if length is reduced, or initialize elements if length is increased.
718718
*/
719719
function unsafeSetLength(bytes[] storage array, uint256 len) internal {
720720
assembly ("memory-safe") {
@@ -725,7 +725,7 @@ library Arrays {
725725
/**
726726
* @dev Helper to set the length of a dynamic array. Directly writing to `.length` is forbidden.
727727
*
728-
* WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
728+
* WARNING: this does not clear elements if length is reduced, or initialize elements if length is increased.
729729
*/
730730
function unsafeSetLength(string[] storage array, uint256 len) internal {
731731
assembly ("memory-safe") {

scripts/generate/templates/Arrays.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ const unsafeSetLength = type => `\
350350
/**
351351
* @dev Helper to set the length of a dynamic array. Directly writing to \`.length\` is forbidden.
352352
*
353-
* WARNING: this does not clear elements if length is reduced, of initialize elements if length is increased.
353+
* WARNING: this does not clear elements if length is reduced, or initialize elements if length is increased.
354354
*/
355355
function unsafeSetLength(${type.name}[] storage array, uint256 len) internal {
356356
assembly ("memory-safe") {

0 commit comments

Comments
 (0)