Archived
lib: Use bytes.Equal instead of bytes.Compare where possible
This commit is contained in:
1 parent
b6f32b6e45
commit
f5f0e46016
8 files changed
+21
-21
No files matched your search
@@ -66,7 +66,7 @@ func (n DeviceID) Compare(other DeviceID) int {
|
||||
}
|
||||
|
||||
func (n DeviceID) Equals(other DeviceID) bool {
|
||||
return bytes.Compare(n[:], other[:]) == 0
|
||||
return bytes.Equal(n[:], other[:])
|
||||
}
|
||||
|
||||
// Short returns an integer representing bits 0-63 of the device ID.
|
||||
|
||||
Reference in new issue
Block a user