-
Notifications
You must be signed in to change notification settings - Fork 592
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
refactor(common): implement Datum::[from|to]_protobuf
#12679
Conversation
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #12679 +/- ##
==========================================
- Coverage 69.40% 69.33% -0.08%
==========================================
Files 1470 1470
Lines 241531 241523 -8
==========================================
- Hits 167637 167449 -188
- Misses 73894 74074 +180
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 21 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
let struct_none = None; | ||
let struct_1 = Some( | ||
let struct_none = Datum::None; | ||
let struct_1 = Datum::Some( |
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.
Why bother change this?
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.
Due to auto_impl(&)
, it seems the type inference will fail as we use .into()
in Some(..)
. 🤣
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.
Actually I think Datum::None
/Datum::Some
can be a good practice, although changing one place doesn't make big difference in regard to maintainability.
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.
LGTM
let struct_none = None; | ||
let struct_1 = Some( | ||
let struct_none = Datum::None; | ||
let struct_1 = Datum::Some( |
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.
Actually I think Datum::None
/Datum::Some
can be a good practice, although changing one place doesn't make big difference in regard to maintainability.
Signed-off-by: Bugen Zhao [email protected]I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
To avoid writing serialization/deserialization logic explicitly. 💦
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.