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

Considering removing from_slice from newtype APIs #249

Open
brycx opened this issue Nov 24, 2021 · 1 comment
Open

Considering removing from_slice from newtype APIs #249

brycx opened this issue Nov 24, 2021 · 1 comment
Labels
breaking change A breaking change investigation Investigation task

Comments

@brycx
Copy link
Member

brycx commented Nov 24, 2021

Since the introduction of serde support, most newtypes implement TryFrom<&[u8]> which simply delegates to from_slice(). This seems a bit redundant, especially if/when moving to Rust 2021 Edition, where TryFrom/TryInto are part of prelude. We could consider removing from_slice in the future and simply provide TryFrom only instead.

@brycx brycx added breaking change A breaking change investigation Investigation task labels Nov 24, 2021
@brycx
Copy link
Member Author

brycx commented Nov 24, 2021

See also #237

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A breaking change investigation Investigation task
Projects
None yet
Development

No branches or pull requests

1 participant