Skip to content

Commit

Permalink
switch to using the length of the data
Browse files Browse the repository at this point in the history
  • Loading branch information
cmwaters committed Aug 5, 2024
1 parent 3dbcd3d commit b1c307d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions share/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,11 @@ func (b *Blob) Compare(other *Blob) int {
}

// IsEmpty returns true if the blob is empty. This is an invalid
// construction that can only occur if using the nil value
// construction that can only occur if using the nil value. We
// only check that the data is empty but this also implies that
// all other fields would have their zero value
func (b *Blob) IsEmpty() bool {
return b.namespace.IsEmpty()
return len(b.data) == 0
}

// Sort sorts the blobs by their namespace.
Expand Down

0 comments on commit b1c307d

Please sign in to comment.