Skip to content

Commit

Permalink
improve style
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Ian Preston <ianopolous@protonmail.com>
  • Loading branch information
ianopolous committed Oct 28, 2017
1 parent 885de4f commit 825add0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions merkledag/utils/diffenum.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,15 @@ func getLinkDiff(a, b node.Node) []diffpair {
inb[l.Cid.KeyString()] = l
}
for _, l := range a.Links() {
ina[l.Cid.KeyString()] = l
if inb[l.Cid.KeyString()] == nil {
var key = l.Cid.KeyString()
ina[key] = l
if inb[key] == nil {
aonly = append(aonly, l.Cid)
}
}

var out []diffpair
var aindex = 0
var aindex int

for _, l := range b.Links() {
if ina[l.Cid.KeyString()] != nil {
Expand Down

0 comments on commit 825add0

Please sign in to comment.