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

Repeated should implement From et. al #263

Closed
m4b opened this issue Jan 6, 2018 · 2 comments
Closed

Repeated should implement From et. al #263

m4b opened this issue Jan 6, 2018 · 2 comments

Comments

@m4b
Copy link

m4b commented Jan 6, 2018

Repeated is just a thin wrapper over vec. Instead of exposing just method, should implement from.

This way people can call into() and not worry about importing the crate just to call from_vec

Since it can’t fail this seems even more appealing.

Usecase: I only use protobuf as client. Importing protobuf crate just to call from_vec seems unnecessary.

@stepancheg
Copy link
Owner

Note that there are few functions implemented in #236, version is not released yet.

If more functions need to be added, PR is welcome.

Also, rust-protobuf codegen should have an option to generate fields of Vec type fields instead of RepeatedField. RepeatedField is an optimization, and it's not always needed.

@stepancheg
Copy link
Owner

Please reopen if this issue is still relevant.

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

No branches or pull requests

2 participants