mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-18 20:15:05 +00:00
also update is_unique for atomic isize
This commit is contained in:
parent
f901946455
commit
8ad6c47211
1 changed files with 11 additions and 1 deletions
|
@ -433,7 +433,17 @@ pub fn isUnique(
|
|||
std.debug.print("| is unique {*}\n", .{isizes - 1});
|
||||
}
|
||||
|
||||
return refcount == REFCOUNT_ONE_ISIZE;
|
||||
switch (RC_TYPE) {
|
||||
.normal => {
|
||||
return refcount == REFCOUNT_ONE_ISIZE;
|
||||
},
|
||||
.atomic => {
|
||||
return refcount == REFCOUNT_ONE_ISIZE or refcount == REFCOUNT_ONE_ATOMIC_ISIZE;
|
||||
},
|
||||
.none => {
|
||||
return false;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// We follow roughly the [fbvector](https://github.com/facebook/folly/blob/main/folly/docs/FBVector.md) when it comes to growing a RocList.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue