-
Notifications
You must be signed in to change notification settings - Fork 225
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
proto: Rename DomainType trait to Protobuf #672
Conversation
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Codecov Report
@@ Coverage Diff @@
## master #672 +/- ##
======================================
Coverage 39.6% 39.6%
======================================
Files 183 182 -1
Lines 12873 12873
Branches 2944 2944
======================================
Hits 5104 5104
Misses 7522 7522
Partials 247 247
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Maybe we should also rename the cases where there are multiple Error crates imported and the one from tendermint_proto::Error is aliased as DomainTypeError. A quick search showed me this in vote.rs, proposal.rs, sign_proposal.rs and sign_vote.rs.
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff.
I'm not sure if the word "equivalent" is the best to describe the similarities between the Protobuf::encode()
and the Prost::Message::encode()
functions. They have similar functionality that they implement differently. Maybe the word is part of some kind of documentation standard (you seem to have used the same template in multiple places) and I don't have a good enough vocabulary to give you a better alternative. Maybe "replacement"? Protobuf::encode()
replaces the Prost::Message::encode()
function with the added features of converting to a domain type. Or something.
If people understand "equivalent", then just ignore me.
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
As discussed on our call yesterday, and towards fulfilling #654, in this PR I've:
DomainType
trait toProtobuf
to clarify its purpose.tendermint-proto
crate, because it makes the most sense there.