Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make serde safe #74

Closed
bkontur opened this issue Sep 29, 2021 · 1 comment
Closed

make serde safe #74

bkontur opened this issue Sep 29, 2021 · 1 comment

Comments

@bkontur
Copy link

bkontur commented Sep 29, 2021

Hi guys,

please, I just want to ask, could serde-rs/serde#2096 be relevant from your point if view?
is it something, which could be easily fixed? or does it make even sense?
Thank you for any response :)

@Shnatsel
Copy link
Member

Shnatsel commented Mar 7, 2022

I have looked into this in the past, and it appears to be both correct and necessary for performance. It does make sense in that particular situation.

Writing to the buffer could potentially be gated on some sort of newtype which would only allow writing valid ASCII, but I'm not sure if it's worth it in this case (and would increase the unsafe count by the metrics, but metrics are imperfect)

@Shnatsel Shnatsel closed this as completed Mar 7, 2022
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

No branches or pull requests

2 participants