From 6def60681b8cb928543ef4a0c917d7414bfadde0 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 1 Aug 2018 16:15:09 -0500 Subject: [PATCH] Upgrade `failure` and fix deprecation warnings (#605) --- crates/cli-support/Cargo.toml | 2 +- crates/cli/Cargo.toml | 2 +- crates/cli/src/bin/wasm-bindgen-test-runner/main.rs | 2 +- crates/cli/src/bin/wasm-bindgen.rs | 2 +- crates/cli/src/bin/wasm2es6js.rs | 2 +- crates/test-project-builder/src/lib.rs | 2 +- crates/web-sys/Cargo.toml | 2 +- crates/web-sys/build.rs | 2 +- crates/webidl/Cargo.toml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/cli-support/Cargo.toml b/crates/cli-support/Cargo.toml index cd11082b..6dc5a91a 100644 --- a/crates/cli-support/Cargo.toml +++ b/crates/cli-support/Cargo.toml @@ -12,7 +12,7 @@ Shared support for the wasm-bindgen-cli package, an internal dependency [dependencies] base64 = "0.9" -failure = "0.1" +failure = "0.1.2" parity-wasm = "0.31" serde = "1.0" serde_derive = "1.0" diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index e4d01564..9aa6661f 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -16,7 +16,7 @@ information see https://github.com/alexcrichton/wasm-bindgen. curl = "0.4.13" docopt = "1.0" env_logger = "0.5" -failure = "0.1" +failure = "0.1.2" log = "0.4" parity-wasm = "0.31" rouille = { version = "2.1.0", default-features = false } diff --git a/crates/cli/src/bin/wasm-bindgen-test-runner/main.rs b/crates/cli/src/bin/wasm-bindgen-test-runner/main.rs index 466334f4..acc663d1 100644 --- a/crates/cli/src/bin/wasm-bindgen-test-runner/main.rs +++ b/crates/cli/src/bin/wasm-bindgen-test-runner/main.rs @@ -48,7 +48,7 @@ fn main() { Err(e) => e, }; eprintln!("error: {}", err); - for cause in err.causes().skip(1) { + for cause in err.iter_causes() { eprintln!("\tcaused by: {}", cause); } process::exit(1); diff --git a/crates/cli/src/bin/wasm-bindgen.rs b/crates/cli/src/bin/wasm-bindgen.rs index 996bf5aa..0f709047 100644 --- a/crates/cli/src/bin/wasm-bindgen.rs +++ b/crates/cli/src/bin/wasm-bindgen.rs @@ -66,7 +66,7 @@ fn main() { Err(e) => e, }; eprintln!("error: {}", err); - for cause in err.causes().skip(1) { + for cause in err.iter_causes() { eprintln!("\tcaused by: {}", cause); } process::exit(1); diff --git a/crates/cli/src/bin/wasm2es6js.rs b/crates/cli/src/bin/wasm2es6js.rs index d171057e..9ff83202 100644 --- a/crates/cli/src/bin/wasm2es6js.rs +++ b/crates/cli/src/bin/wasm2es6js.rs @@ -50,7 +50,7 @@ fn main() { Err(e) => e, }; eprintln!("error: {}", err); - for cause in err.causes().skip(1) { + for cause in err.iter_causes() { eprintln!("\tcaused by: {}", cause); } process::exit(1); diff --git a/crates/test-project-builder/src/lib.rs b/crates/test-project-builder/src/lib.rs index c2985223..e3cc5b39 100644 --- a/crates/test-project-builder/src/lib.rs +++ b/crates/test-project-builder/src/lib.rs @@ -596,7 +596,7 @@ impl Project { .generate(&root); if let Err(e) = res { - for e in e.causes() { + for e in e.iter_chain() { println!("- {}", e); } panic!("failed"); diff --git a/crates/web-sys/Cargo.toml b/crates/web-sys/Cargo.toml index afca278d..13ca6478 100644 --- a/crates/web-sys/Cargo.toml +++ b/crates/web-sys/Cargo.toml @@ -10,7 +10,7 @@ test = false [build-dependencies] env_logger = "0.5.10" -failure = "0.1" +failure = "0.1.2" wasm-bindgen-webidl = { path = "../webidl", version = "=0.2.15" } sourcefile = "0.1" diff --git a/crates/web-sys/build.rs b/crates/web-sys/build.rs index 02f9766c..0496a979 100644 --- a/crates/web-sys/build.rs +++ b/crates/web-sys/build.rs @@ -15,7 +15,7 @@ use std::process; fn main() { if let Err(e) = try_main() { eprintln!("Error: {}", e); - for c in e.causes().skip(1) { + for c in e.iter_causes() { eprintln!(" caused by {}", c); } process::exit(1); diff --git a/crates/webidl/Cargo.toml b/crates/webidl/Cargo.toml index 85ce6e52..e953891e 100644 --- a/crates/webidl/Cargo.toml +++ b/crates/webidl/Cargo.toml @@ -12,8 +12,8 @@ Support for parsing WebIDL specific to wasm-bindgen """ [dependencies] -failure = "0.1" -failure_derive = "0.1" +failure = "0.1.2" +failure_derive = "0.1.2" heck = "0.3" log = "0.4.1" proc-macro2 = "0.4.8"