Skip to content

Commit 2f1cd75

Browse files
authored
Merge pull request #309 from onflow/bastian/improve-key-iteration
Optimize iteration over dictionary keys
2 parents b96afd3 + d7a9965 commit 2f1cd75

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cadence/contracts/FlowALPModels.cdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ access(all) contract FlowALPModels {
553553
effectiveDebt: {Type: UFix128}
554554
) {
555555
// Enforce single balance per token invariant: if a type appears in one map, it must not appear in the other.
556-
for collateralType in effectiveCollateral.keys {
556+
for collateralType in effectiveCollateral {
557557
assert(effectiveDebt[collateralType] == nil, message: "cannot construct BalanceSheet: observed both credit and debit balance for \(collateralType.identifier)")
558558
}
559559

0 commit comments

Comments
 (0)