Use &’static str for backend

This commit is contained in:
Syrus
2020-01-15 14:04:08 +01:00
parent a1d8b9aa5b
commit 273a6307f7
3 changed files with 4 additions and 4 deletions

View File

@ -110,7 +110,7 @@ mod tests {
baseline: true,
msm: msm,
base: instance.module.runnable_module.get_code().unwrap().as_ptr() as usize,
backend: MCG::backend_id().to_string(),
backend: MCG::backend_id(),
runnable_module: instance.module.runnable_module.clone(),
});
true
@ -152,7 +152,7 @@ mod tests {
baseline: true,
msm: msm,
base: instance.module.runnable_module.get_code().unwrap().as_ptr() as usize,
backend: MCG::backend_id().to_string(),
backend: MCG::backend_id(),
runnable_module: instance.module.runnable_module.clone(),
});
true

View File

@ -186,7 +186,7 @@ pub struct CodeVersion {
pub base: usize,
/// The backend used to compile this module.
pub backend: String,
pub backend: &'static str,
/// `RunnableModule` for this code version.
pub runnable_module: Arc<Box<dyn RunnableModule>>,

View File

@ -486,7 +486,7 @@ fn execute_wasi(
baseline: true,
msm: msm,
base: instance.module.runnable_module.get_code().unwrap().as_ptr() as usize,
backend: options.backend.to_string().to_owned(),
backend: options.backend.to_string(),
runnable_module: instance.module.runnable_module.clone(),
});
true