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

Set backend_id to static str #1143

Merged
merged 3 commits into from
Jan 15, 2020
Merged

Set backend_id to static str #1143

merged 3 commits into from
Jan 15, 2020

Conversation

syrusakbary
Copy link
Member

Description

As per feedback in #1099, set backend_id to static str.

Review

  • Add a short description of the the change to the CHANGELOG.md file

Copy link
Contributor

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

LGTM!

@Hywan Hywan self-assigned this Jan 13, 2020
@Hywan Hywan added 🎉 enhancement New feature! 📦 lib-deprecated About the deprecated crates labels Jan 13, 2020
Copy link
Contributor

@MarkMcCaskey MarkMcCaskey left a comment

Choose a reason for hiding this comment

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

Looks, good -- we can probably push it a bit further and store it as a &static str instead of a String, too!

@@ -82,7 +82,7 @@ pub fn read_module<

func_assoc: Map::new(),
signatures: Map::new(),
backend: MCG::backend_id(),
backend: MCG::backend_id().to_string(),
Copy link
Contributor

Choose a reason for hiding this comment

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

If we know that it has to be &'static str, then we can change it to be a &'static str in the structs too and remove all uses of to_string()!

@MarkMcCaskey
Copy link
Contributor

bors r+

bors bot added a commit that referenced this pull request Jan 15, 2020
1143: Set backend_id to static str r=MarkMcCaskey a=syrusakbary

<!-- 
Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test:
https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests

-->

# Description

As per feedback in #1099, set backend_id to static str.

<!-- 
Provide details regarding the change including motivation,
links to related issues, and the context of the PR.
-->

# Review

- [ ] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Syrus <[email protected]>
Co-authored-by: Mark McCaskey <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jan 15, 2020

Build succeeded

@bors bors bot merged commit 75d7f10 into master Jan 15, 2020
@bors bors bot deleted the backend-id-str branch January 15, 2020 18:55
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.

3 participants