Skip to content
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

Add extend to imports #286

Merged
merged 3 commits into from
Mar 25, 2019
Merged

Add extend to imports #286

merged 3 commits into from
Mar 25, 2019

Conversation

MarkMcCaskey
Copy link
Contributor

a rewrite of #283 with a focus on simplicity

resolves #258

@MarkMcCaskey MarkMcCaskey added 🎉 enhancement New feature! 📦 lib-deprecated About the deprecated crates labels Mar 23, 2019
let mut map = self.map.borrow_mut();
for (ns, id, exp) in iter.into_iter() {
if let Some(like_ns) = map.get_mut(&ns) {
like_ns.maybe_insert(&id, exp).expect(&format!(
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should panic if the imports are overwritten. The same way extend doesn't panic on extending a HashMap.

@MarkMcCaskey MarkMcCaskey marked this pull request as ready for review March 25, 2019 01:15
@MarkMcCaskey
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request Mar 25, 2019
bors bot added a commit that referenced this pull request Mar 25, 2019
286: Add extend to imports  r=MarkMcCaskey a=MarkMcCaskey

a rewrite of #283 with a focus on simplicity

resolves #258

Co-authored-by: Mark McCaskey <mark@wasmer.io>
@bors
Copy link
Contributor

bors bot commented Mar 25, 2019

@bors
Copy link
Contributor

bors bot commented Mar 25, 2019

@bors bors bot merged commit 225b82a into master Mar 25, 2019
@bors bors bot deleted the feature/extending-imports-again branch March 25, 2019 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 enhancement New feature! 📦 lib-deprecated About the deprecated crates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to combine two import objects
2 participants