Skip to content

Commit

Permalink
refactor: remove unchecked increment in for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
andreivladbrg committed Dec 14, 2023
1 parent 12ff1e4 commit cbdd790
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/SablierV2OpenEnded.sol
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ contract SablierV2OpenEnded is ISablierV2OpenEnded, NoDelegateCall, SablierV2Ope

uint256 streamId;
uint128 amount;
for (uint256 i = 0; i < streamIdsCount;) {
for (uint256 i = 0; i < streamIdsCount; ++i) {
streamId = streamIds[i];

// Checks: the stream is not canceled.
Expand All @@ -205,11 +205,6 @@ contract SablierV2OpenEnded is ISablierV2OpenEnded, NoDelegateCall, SablierV2Ope

// Checks, Effects and Interactions: deposit on stream.
_deposit(streamId, amount);

// Increment the for loop iterator.
unchecked {
i += 1;
}
}
}

Expand Down

0 comments on commit cbdd790

Please sign in to comment.