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

remove most of the panics and panic-indexing from Protobuf module #486

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

cdisselkoen
Copy link
Contributor

In several places we were first checking-for-empty and then panic-indexing to get the next byte. Refactored this to use a new helper nextByte that returns Option. Also overhauled utf8DecodeChar to actually consume the bytes as it goes, rather than the previous behavior of use-but-not-consume them and return an integer indicating how much the iterator needs to be advanced. Overhauled the proof of utf8DecodeChar.progress to now prove that it progresses the iterator, rather than returns a positive integer.

@cdisselkoen cdisselkoen requested review from emina, adpaco-aws and AMZ-brandon and removed request for AMZ-brandon November 27, 2024 16:23
@cdisselkoen cdisselkoen merged commit 8bfd830 into main Dec 3, 2024
6 checks passed
@cdisselkoen cdisselkoen deleted the cdisselkoen/fewer-panics branch December 3, 2024 18:52
@cdisselkoen cdisselkoen mentioned this pull request Dec 10, 2024
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.

3 participants