mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-31 00:57:24 +00:00
remove unnecesarry capacity check within Str equals
This commit is contained in:
parent
fc0a9ec4cf
commit
4fd013eee8
1 changed files with 2 additions and 3 deletions
|
@ -179,7 +179,7 @@ pub const RocStr = extern struct {
|
|||
|
||||
pub fn eq(self: RocStr, other: RocStr) bool {
|
||||
// If they are byte-for-byte equal, they're definitely equal!
|
||||
if (self.bytes == other.bytes and self.length == other.length and self.capacity_or_alloc_ptr == other.capacity_or_alloc_ptr) {
|
||||
if (self.bytes == other.bytes and self.length == other.length) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2256,8 +2256,7 @@ test "withAsciiUppercased: seamless slice" {
|
|||
}
|
||||
|
||||
pub fn strCaselessAsciiEquals(self: RocStr, other: RocStr) callconv(.C) bool {
|
||||
// If they are byte-for-byte equal, they're definitely equal!
|
||||
if (self.bytes == other.bytes and self.length == other.length and self.capacity_or_alloc_ptr == other.capacity_or_alloc_ptr) {
|
||||
if (self.bytes == other.bytes and self.length == other.length) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue