mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Use parens, not WSA in tests, add docs linebreaks, factor calls into a var.
This commit is contained in:
parent
65ec82aa2a
commit
06640edb63
3 changed files with 21 additions and 9 deletions
|
@ -371,11 +371,12 @@ pub const RocStr = extern struct {
|
|||
}
|
||||
|
||||
fn refcount(self: RocStr) usize {
|
||||
if ((self.getCapacity() == 0 and !self.isSeamlessSlice()) or self.isSmallStr()) {
|
||||
const is_seamless_slice = self.isSeamlessSlice();
|
||||
if ((self.getCapacity() == 0 and !is_seamless_slice) or self.isSmallStr()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const data_ptr = if (self.isSeamlessSlice())
|
||||
const data_ptr = if (is_seamless_slice)
|
||||
self.getAllocationPtr()
|
||||
else
|
||||
self.bytes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue