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

Accept impl AsRef<[u8]> in encode #55

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

wiktor-k
Copy link
Contributor

By using impl AsRef<[u8]> instead of raw &[u8] encode may be used with Strings and string slices directly. This is also important for foreign types as they can implement AsRef<[u8]> and be directly usable by encode.

By using `impl AsRef<[u8]>` instead of raw `&[u8]` encode may be used
with Strings and string slices directly. This is also important for
foreign types as they can implement `AsRef<[u8]>` and be directly
usable by `encode`.

Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
@wiktor-k wiktor-k force-pushed the wiktor/make-encode-more-flexible branch from c3d384b to 1243383 Compare October 16, 2024 09:25
@matusf matusf changed the title Make encode more flexible Accept impl AsRef<[u8]> in encode Oct 29, 2024
@matusf matusf merged commit e82d742 into matusf:master Oct 29, 2024
23 checks passed
@matusf
Copy link
Owner

matusf commented Oct 29, 2024

Thank you!

@wiktor-k wiktor-k deleted the wiktor/make-encode-more-flexible branch October 29, 2024 14:29
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.

2 participants