Skip to content

Commit

Permalink
One more improvement from review
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeSpreitzer committed Feb 10, 2020
1 parent d5a572c commit df4b789
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions staging/kos/pkg/apis/network/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ func (writes WriteSet) SetWrite(section string, serverTime Timestamp) WriteSet {
func (writes WriteSet) Diff(others WriteSet) WriteSet {
ans := make(WriteSet, 0, len(writes))
for _, wr := range writes {
owr, _ := others.GetWrite(wr.Section)
if owr == (ObjectWrite{}) {
_, found := others.GetWrite(wr.Section)
if !found {
ans = append(ans, wr)
}
}
Expand Down
4 changes: 2 additions & 2 deletions staging/kos/pkg/apis/network/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ func (writes WriteSet) SetWrite(section string, serverTime Timestamp) WriteSet {
func (writes WriteSet) Diff(others WriteSet) WriteSet {
ans := make(WriteSet, 0, len(writes))
for _, wr := range writes {
owr, _ := others.GetWrite(wr.Section)
if owr == (ObjectWrite{}) {
_, found := others.GetWrite(wr.Section)
if !found {
ans = append(ans, wr)
}
}
Expand Down

0 comments on commit df4b789

Please sign in to comment.