This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Upgrade elastic array #5949
Merged
rphmeier
merged 2 commits into
openethereum:master
from
eira-fransham:upgrade-elastic-array
Jun 29, 2017
Merged
Upgrade elastic array #5949
rphmeier
merged 2 commits into
openethereum:master
from
eira-fransham:upgrade-elastic-array
Jun 29, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It looks like @Vurich signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
debris
approved these changes
Jun 28, 2017
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, 1 minor grumble
rpc/src/v1/helpers/light_fetch.rs
Outdated
@@ -192,7 +192,7 @@ impl LightFetch { | |||
let action = req.to.map_or(Action::Create, Action::Call); | |||
let gas = req.gas.unwrap_or(U256::from(10_000_000)); // better gas amount? | |||
let value = req.value.unwrap_or_else(U256::zero); | |||
let data = req.data.map_or_else(Vec::new, |d| d.to_vec()); | |||
let data = req.data.unwrap_or(Vec::new()); |
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.
unwrap_or_default
might be a better choice
I need to fix the build for tests (they don't get built by default so I only saw the problems when CI tried it out), I'll fix the minor grumble too (I 100% agree with it). |
rphmeier
added
A7-looksgoodtestsfail 🤖
Pull request is reviewed well, but cannot be merged due to tests failing.
M4-core ⛓
Core client code / Rust.
labels
Jun 28, 2017
This is a huge change, which includes some changes to replace code that originally cloned to reuse allocations instead. The updated `elastic-array` crate renames its consuming `Vec`-conversion method to `into_vec`, which means that I can do a simple `sed -i 's/to_vec/into_vec/'` and then fix the compilation errors. This commit is probably a minor performance win and definitely a significant readability win.
eira-fransham
force-pushed
the
upgrade-elastic-array
branch
from
June 29, 2017 13:12
1db1050
to
01ce28b
Compare
Tests passing now, ready to merge? |
rphmeier
added
A8-looksgood 🦄
Pull request is reviewed well.
and removed
A7-looksgoodtestsfail 🤖
Pull request is reviewed well, but cannot be merged due to tests failing.
labels
Jun 29, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a huge change, which includes some changes to replace code that originally cloned to reuse allocations instead. The updated
elastic-array
crate renames its consumingVec
-conversion method tointo_vec
, which means that I can do a simplesed -i 's/to_vec/into_vec/'
and then fix the compilation errors.This commit is probably a minor performance win and definitely a significant readability win.