Skip to content

Commit ecff40b

Browse files
Remove unnecessary casts
1 parent a5a6bd6 commit ecff40b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

edgraph/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2152,7 +2152,7 @@ func verifyUniqueWithinMutation(qc *queryContext) error {
21522152
for i := range qc.uniqueVars {
21532153
gmuIndex, rdfIndex := decodeIndex(i)
21542154
// handles cases where the mutation was pruned in updateMutations
2155-
if gmuIndex >= uint32(len(qc.gmuList)) || qc.gmuList[gmuIndex] == nil || uint32(rdfIndex) >= uint32(len(qc.gmuList[gmuIndex].Set)) {
2155+
if gmuIndex >= uint32(len(qc.gmuList)) || qc.gmuList[gmuIndex] == nil || rdfIndex >= uint32(len(qc.gmuList[gmuIndex].Set)) {
21562156
continue
21572157
}
21582158
pred1 := qc.gmuList[gmuIndex].Set[rdfIndex]
@@ -2163,7 +2163,7 @@ func verifyUniqueWithinMutation(qc *queryContext) error {
21632163
}
21642164
gmuIndex2, rdfIndex2 := decodeIndex(j)
21652165
// bounds check for the second predicate, which could also have been pruned
2166-
if gmuIndex2 >= uint32(len(qc.gmuList)) || qc.gmuList[gmuIndex2] == nil || uint32(rdfIndex2) >= uint32(len(qc.gmuList[gmuIndex2].Set)) {
2166+
if gmuIndex2 >= uint32(len(qc.gmuList)) || qc.gmuList[gmuIndex2] == nil || rdfIndex2 >= uint32(len(qc.gmuList[gmuIndex2].Set)) {
21672167
continue
21682168
}
21692169
pred2 := qc.gmuList[gmuIndex2].Set[rdfIndex2]

0 commit comments

Comments
 (0)