Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been meaning to do this for a while, but I'm finally getting around to it.
I removed all uses of unsafe Rust, and there is no meaningful impact on performance. While the unsafe stuff was probably sound, I would much prefer to not have any unsafe if we can.
The main reason I used unsafe before was to avoid needing to zero out buffers before sending them to the decoder to fill. But I figured out I can get around this by just clearing the Vecs and using
extend_from_slice()
inside the decoder instead.Although of course removing the unsafe is a breaking change, but I don't think there's anyone that was creating their own custom decoders and encoders anyway (if I'm wrong, please correct me). I think it's okay to just bump the version of creek to
1.2.0
.I also bumped the dependency versions since that was simple to do.
I also updated the demos to use the latest version of egui. I would have done this in a separate PR, but I wasn't able to get the old demos to run, and I wanted to use them to test if my changes still worked as expected.