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

Removing From<Vec<u8>> and From<ByteBuf> was mistake #15

Open
misos1 opened this issue Jul 12, 2019 · 1 comment
Open

Removing From<Vec<u8>> and From<ByteBuf> was mistake #15

misos1 opened this issue Jul 12, 2019 · 1 comment

Comments

@misos1
Copy link

misos1 commented Jul 12, 2019

f8c4812
f810459
#3

They could coexists with ByteBuf::from and ByteBuf::into_vec if you think these functions are clearer in documentation. I never had problems with looking for From trait implementations.

Now is not possible to use it with generic functions which uses things like T: From<Vec<u8>>. There is reason why there are traits like From trait in rust.

And solution to problems like this #14 require even more extra glue code as before.

ptrus added a commit to oasislabs/oasis-ethwasi-runtime that referenced this issue Sep 23, 2020
@nathanielc
Copy link

Would a PR to re-add From<Vec<u8>> and From<ByteBuf> be accepted? I have run into the exact case mentioned above where I need ByteBuf to implement the From<Vec<u8>> because it is used as a type parameter to another trait with that constraint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants