Skip to content

Commit 048ba54

Browse files
committed
Try #305:
2 parents 2982e6e + 9478ba7 commit 048ba54

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Diff for: src/bin/wasmer.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
203203
};
204204

205205
// TODO: refactor this
206-
#[cfg(not(features = "wasi"))]
206+
#[cfg(not(feature = "wasi"))]
207207
let (_abi, import_object, _em_globals) = if wasmer_emscripten::is_emscripten_module(&module) {
208208
let mut emscripten_globals = wasmer_emscripten::EmscriptenGlobals::new(&module);
209209
(
@@ -219,14 +219,18 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
219219
)
220220
};
221221

222-
#[cfg(features = "wasi")]
222+
#[cfg(feature = "wasi")]
223223
let (_abi, import_object) = if wasmer_wasi::is_wasi_module(&module) {
224224
(
225225
InstanceABI::WASI,
226226
wasmer_wasi::generate_import_object(
227-
options.args.iter().map(|arg| arg.into_bytes()).collect(),
228-
env::vars()
227+
options
228+
.args
229229
.iter()
230+
.cloned()
231+
.map(|arg| arg.into_bytes())
232+
.collect(),
233+
env::vars()
230234
.map(|(k, v)| format!("{}={}", k, v).into_bytes())
231235
.collect(),
232236
),

0 commit comments

Comments
 (0)