Skip to content

Commit

Permalink
Merge #1644
Browse files Browse the repository at this point in the history
1644: Fix bug with `default-native` feature in store.rs r=syrusakbary a=MarkMcCaskey

resolves #1560 

Before shipping, lets add test(s) for this kind of thing

# Review

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


Co-authored-by: Mark McCaskey <mark@wasmer.io>
  • Loading branch information
bors[bot] and Mark McCaskey authored Sep 23, 2020
2 parents c2c5bf3 + 79392e5 commit e5b3273
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/api/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ impl Default for Store {
}
}

#[allow(unreachable_code)]
fn get_engine(config: impl CompilerConfig + Send + Sync) -> impl Engine + Send + Sync {
#[allow(unreachable_code, unused_mut)]
fn get_engine(mut config: impl CompilerConfig + Send + Sync) -> impl Engine + Send + Sync {
cfg_if::cfg_if! {
if #[cfg(feature = "default-jit")] {
wasmer_engine_jit::JIT::new(&config)
.engine()
} else if #[cfg(feature = "default-native")] {
wasmer_engine_native::Native::new(&config)
wasmer_engine_native::Native::new(&mut config)
.engine()
} else {
compile_error!("No default engine chosen")
Expand Down

0 comments on commit e5b3273

Please sign in to comment.