-
Notifications
You must be signed in to change notification settings - Fork 525
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: remove some useless Result
#3561
Conversation
Result
Result
Result
Result
Codecov Report
@@ Coverage Diff @@
## main #3561 +/- ##
=======================================
Coverage 74.38% 74.38%
=======================================
Files 771 771
Lines 108700 108701 +1
=======================================
+ Hits 80857 80861 +4
+ Misses 27843 27840 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Previously we add Result to all functions containing memory allocation, so as to properly control memory usage. But I also find it tedious. So maybe it's a good idea to remove them. |
In fact, memory-control is very hard, we should reconsider them. Before that, LGTM |
Leaving the huge PR stuck is not a good idea. Currently, I decide to merge it to reduce our effort. Only if we have a well-designed memory control mechanism, we can add them back. |
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
As title, include
Vis::is_set
,Bitmap::iter_from
: All their call-cite areunwrap
. Actually I wanted to remove fromBitmap::is_set
but there are too many usages thus not sure whether it's safe.ArrayBuilder::new/with_meta
: Their implementation only returns Ok or panics, and I think this interface should not have error.There are still too many unnecessary
Result
, so not included in this PR. Also feel free to challenge me that theResult
in the interface makes senseChecklist
./risedev check
(or alias,./risedev c
)Refer to a related PR or issue link (optional)