mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
fix roc_std to support seamless str slices
This commit is contained in:
parent
3978059aa2
commit
18e6dbd163
2 changed files with 17 additions and 10 deletions
|
@ -698,6 +698,11 @@ impl From<SendSafeRocStr> for RocStr {
|
|||
|
||||
#[repr(C)]
|
||||
union RocStrInner {
|
||||
// TODO: this really should be separated from the List type.
|
||||
// Due to length specifying seamless slices for Str and capacity for Lists they should not share the same code.
|
||||
// Currently, there are work arounds in RocList to handle both via removing the highest bit of length in many cases.
|
||||
// With glue changes, we should probably rewrite these cleanly to match what is in the zig bitcode.
|
||||
// It is definitely a bit stale now and I think the storage mechanism can be quite confusing with our extra pieces of state.
|
||||
heap_allocated: ManuallyDrop<RocList<u8>>,
|
||||
small_string: SmallString,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue