Remove Stdio hack

This commit is contained in:
Syrus 2018-12-10 19:35:42 -08:00
parent 6f179ed4d2
commit 914addc1f3
2 changed files with 1 additions and 4 deletions

View File

@ -1,6 +1,6 @@
use libc;
use std::fs::File;
use std::io::{Read, Write};
use std::io::{Read};
use std::os::unix::io::FromRawFd;
// A struct to hold the references to the base stdout and the captured one

View File

@ -16,9 +16,6 @@ macro_rules! assert_emscripten_output {
isa: get_isa(),
});
let mut result_object = instantiate(wasm_bytes.to_vec(), import_object, options).expect("Not compiled properly");
// We use this as a way of hacking the stdout and remove the data that should be flushed
(StdioCapturer::new()).end();
let capturer = StdioCapturer::new();
start_instance(&result_object.module, &mut result_object.instance, $name, $args).unwrap();
let output = capturer.end().0;