-
Notifications
You must be signed in to change notification settings - Fork 824
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
Conversation
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!
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.
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(), |
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.
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()
!
bors r+ |
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]>
Build succeeded
|
Description
As per feedback in #1099, set backend_id to static str.
Review