From 58a5b52d80ea315ea8ce709c708597dcdac3f5fa Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Thu, 26 May 2022 09:43:50 +0100 Subject: [PATCH] Deny unused crate dependencies (#584) * Deny unused crate dependencies * Deny unused crate dependencies * Remove ink_lang_codegen --- Cargo.lock | 3 --- Cargo.toml | 3 --- metadata/lib.rs | 2 ++ src/main.rs | 2 ++ 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 36737b010..f75c0e353 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -479,14 +479,12 @@ dependencies = [ "current_platform", "env_logger", "escape8259", - "futures", "heck", "hex", "impl-serde", "indexmap", "ink_env", "ink_lang", - "ink_lang_codegen", "ink_metadata", "ink_primitives", "ink_storage", @@ -511,7 +509,6 @@ dependencies = [ "substrate-build-script-utils", "subxt", "tempfile", - "thiserror", "toml", "url", "wabt", diff --git a/Cargo.toml b/Cargo.toml index 2d68f15f7..69f8a4085 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,13 +56,11 @@ sp-core = "6.0.0" sp-runtime = "6.0.0" pallet-contracts-primitives = "6.0.0" subxt = "0.21.0" -futures = "0.3.19" hex = "0.4.3" jsonrpsee = { version = "0.13.1", features = ["ws-client"] } nom = "7.1.1" nom-supreme = { version = "0.7.0", features = ["error"] } indexmap = "1.8.1" -thiserror = "1.0.31" escape8259 = "0.5.1" itertools = "0.10.3" @@ -86,7 +84,6 @@ predicates = "2.1.1" ink_primitives = "3" ink_storage = "3" ink_lang = "3" -ink_lang_codegen = "3" [features] # This `std` feature is required for testing using an inline contract's metadata, because `ink!` annotates the metadata diff --git a/metadata/lib.rs b/metadata/lib.rs index 6a71554c8..76aa32ef2 100644 --- a/metadata/lib.rs +++ b/metadata/lib.rs @@ -52,6 +52,8 @@ //! let json = serde_json::to_value(&metadata).unwrap(); //! ``` +#![deny(unused_crate_dependencies)] + mod byte_str; use semver::Version; diff --git a/src/main.rs b/src/main.rs index eee566156..af5039b89 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with cargo-contract. If not, see . +#![deny(unused_crate_dependencies)] + mod cmd; mod crate_metadata; mod util;