mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-06-26 21:22:13 +00:00
fix warnings
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
#[macro_use] extern crate serde_derive;
|
#[cfg_attr(test, macro_use)] #[cfg(test)] extern crate serde_derive;
|
||||||
extern crate parity_wasm;
|
extern crate parity_wasm;
|
||||||
extern crate serde;
|
extern crate serde;
|
||||||
extern crate serde_json;
|
extern crate serde_json;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#![cfg(test)]
|
#![cfg(test)]
|
||||||
|
|
||||||
use std::{self, env};
|
use std::env;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
@ -50,9 +50,6 @@ fn run_action(module: &ModuleInstance, action: &test::Action)
|
|||||||
|
|
||||||
fn run_spec(spec_name: &str) {
|
fn run_spec(spec_name: &str) {
|
||||||
let outdir = env::var("OUT_DIR").unwrap();
|
let outdir = env::var("OUT_DIR").unwrap();
|
||||||
println!("outdir {}", outdir);
|
|
||||||
|
|
||||||
let spec_name = "i32";
|
|
||||||
|
|
||||||
let mut wast2wasm_path = PathBuf::from(outdir.clone());
|
let mut wast2wasm_path = PathBuf::from(outdir.clone());
|
||||||
wast2wasm_path.push("bin");
|
wast2wasm_path.push("bin");
|
||||||
@ -73,8 +70,8 @@ fn run_spec(spec_name: &str) {
|
|||||||
let spec: test::Spec = serde_json::from_reader(&mut f).unwrap();
|
let spec: test::Spec = serde_json::from_reader(&mut f).unwrap();
|
||||||
|
|
||||||
let first_command = &spec.commands[0];
|
let first_command = &spec.commands[0];
|
||||||
let (mut program, mut module) = match first_command {
|
let (mut _program, mut module) = match first_command {
|
||||||
&test::Command::Module { line, ref filename } => {
|
&test::Command::Module { ref filename, .. } => {
|
||||||
setup_program(&outdir, filename)
|
setup_program(&outdir, filename)
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
@ -84,9 +81,8 @@ fn run_spec(spec_name: &str) {
|
|||||||
|
|
||||||
for command in spec.commands.iter().skip(1) {
|
for command in spec.commands.iter().skip(1) {
|
||||||
match command {
|
match command {
|
||||||
&test::Command::Module { line, ref filename } => {
|
&test::Command::Module { ref filename, .. } => {
|
||||||
let (new_program, new_module) = setup_program(&outdir, &filename);
|
let (_new_program, new_module) = setup_program(&outdir, &filename);
|
||||||
program = new_program;
|
|
||||||
module = new_module;
|
module = new_module;
|
||||||
},
|
},
|
||||||
&test::Command::AssertReturn { line, ref action, ref expected } => {
|
&test::Command::AssertReturn { line, ref action, ref expected } => {
|
||||||
|
Reference in New Issue
Block a user