allocation used for base64 encoding when possibly unnecesssary? #225
Closed
kaizoplant
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
(didnt wanna open an issue in case this was intentional)
i was wondering about some of the functions that take an allocator just to allocate the base64 encoding of a thing (Vaxis.copyToSystemClipboard, Vaxis.transmitLocalImagePath), and why thats used over having a formatter do it (uh random example below)
i can see not doing this if the priority is not doing syscalls when unnecessary and might be a bit messy with determining buffered writer size, and also if its about code style(? not sure if this is the correct way to say it), writing the formatting would be made simpler by the writergate changes having the {b64} formatting field be builtin i think, but was just wondering if this was an intentional design decision or such,
(actually thinking about it for a second its probably so that like part of a write doesnt fail right, so the terminal state doesnt get messed up if the control sequence starts but doesnt finish, thats my guess at least)
Beta Was this translation helpful? Give feedback.
All reactions