Skip to content

Add niche to ColdString to make Option<ColdString> the same size as ColdString#8

Open
luksan wants to merge 1 commit intotomtomwombat:mainfrom
luksan:non_null_niche
Open

Add niche to ColdString to make Option<ColdString> the same size as ColdString#8
luksan wants to merge 1 commit intotomtomwombat:mainfrom
luksan:non_null_niche

Conversation

@luksan
Copy link
Copy Markdown

@luksan luksan commented Apr 27, 2026

This changes the type of the internal "encdoded" from *const u8 to NonNull in order to create a niche so that Option has the same size as ColdString. To handle storing of WIDTH NUL bytes the NULL pointer is mapped to a static [0u8; WIDTH] array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant