Skip to content

Commit

Permalink
client Networks Equals is set equality
Browse files Browse the repository at this point in the history
  • Loading branch information
langmartin committed Apr 11, 2019
1 parent f474641 commit f8d4323
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions nomad/structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2356,12 +2356,11 @@ func (n *Networks) Equals(o *Networks) bool {
if len(*n) != len(*o) {
return false
}
oa := *o
// REVIEW: should this be set equality?
// in current code len is always 1 or 0
for i, e := range *n {
if !e.Equals(oa[i]) {
return false
for _, ne := range *n {
for _, oe := range *o {
if !ne.Equals(oe) {
return false
}
}
}
return true
Expand Down

0 comments on commit f8d4323

Please sign in to comment.