Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

APIs wildcards and simple arithmetic. #5402

Merged
merged 1 commit into from Apr 6, 2017
Merged

APIs wildcards and simple arithmetic. #5402

merged 1 commit into from Apr 6, 2017

Conversation

tomusdrw
Copy link
Collaborator

@tomusdrw tomusdrw commented Apr 5, 2017

Closes #5394

@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. B7-releasenotes 📜 Changes should be mentioned in the release notes of the next minor version release. M4-core ⛓ Core client code / Rust. labels Apr 5, 2017
Copy link
Contributor

@maciejhirsz maciejhirsz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

.into_iter().collect();
let mut public_list = vec![
Api::Web3, Api::Net, Api::Eth, Api::Parity, Api::Rpc,
].into_iter().collect();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in places like these I wish we had an "iter" macro in the standard library: http://play.integer32.com/?gist=d0bf3fcbfcbb35ad8752ed5be30bda64&version=undefined

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could skip the vec! and just use an array.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, that too. but then you have to either have a HashSet<&Api> or add a Clone impl

@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Apr 6, 2017
@gavofyork gavofyork merged commit f223ed2 into master Apr 6, 2017
@gavofyork gavofyork deleted the apisets branch April 6, 2017 17:38
adrianbrink pushed a commit to adrianbrink/parity that referenced this pull request Apr 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. B7-releasenotes 📜 Changes should be mentioned in the release notes of the next minor version release. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants