Update documentation for v0.21 deprecations #261
Merged
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.
👋🏻 Hello! I used this
base64
crate for the first time this past week in a project. Honestly when I started, I first didn’t even look at the documentation – I ran acargo add base64
, and then tried typingbase64::decode
in my editor.That function did exist, and does exactly what I wanted (decode canonical base64 input using the standard alphabet), but it showed as
deprecated. So I went to docs.rs to see what I was supposed to use instead, and I found the current crate documentation difficult to understand how to set up base64 decoding and/or encoding.I appreciate this crate and the flexibility it offers for the nuances of base64 (different alphabets, padding
=
character handling), and here I’ve made an attempt to update the crate documentation to help a new user navigate those nuances, and successfully start decoding/encoding data.In the updated documentation, I’ve made sure there’s a code sample immediately visible which shows how to do decoding and encoding using default settings, and I (attempt to) explain enough of the nuance of base64 to empower users who would want non-default choices to get the setup they need.
I’ve submitted many more pull requests on code than on prose 😅 – I’m not sure how you’d want to review this, but I can keep workshopping the text. 🙏🏻 I also made some tweaks to the existing
base64.rs
example.