Skip to content

add Base64Slice, the borrowed counterpart of Base64Vec - #13

Merged
sunshowers merged 1 commit into
jj-stack/factor-out-shared-hex-and-serde-helpers-utxyrlvofrom
jj-stack/add-base64slice-the-borrowed-counterpart-of-base64vec-rklwmvyl
Oct 21, 2026
Merged

sunshowers merged 1 commit into
jj-stack/factor-out-shared-hex-and-serde-helpers-utxyrlvofrom
jj-stack/add-base64slice-the-borrowed-counterpart-of-base64vec-rklwmvyl

Conversation

@sunshowers

@sunshowers sunshowers commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

I'd like to use this in a static context.

Base64Slice is just a borrowed [u8] and doesn't need alloc. To handle that we need to write a displayer ourselves, but that isn't too bad -- mostly just about computing parameters like width and fill ourselves, and adding tests to ensure the display impls are the same.

@sunshowers
sunshowers added this pull request to stack #16 October 21, 2026 06:23
I'd like to use this in a static context.

`Base64Slice` is just a borrowed `[u8]` and doesn't need alloc. To handle that we need to write a displayer ourselves, but that isn't too bad -- mostly just about computing parameters like width and fill ourselves, and adding tests to ensure the display impls are the same.
@sunshowers
sunshowers force-pushed the jj-stack/add-base64slice-the-borrowed-counterpart-of-base64vec-rklwmvyl branch from 5cb617b to 1748fcd Compare October 21, 2026 06:40
@sunshowers

Copy link
Copy Markdown
Collaborator Author

Revision history

Version Changes from previous version Submitted commit
2 (current) 5cb617b8..1748fcdf 1748fcdf
1 Initial version 5cb617b8

Generated by jj-stack from this pull request's force-push history.

@sunshowers
sunshowers merged commit 607e5d3 into main Oct 21, 2026
7 checks passed
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