From c802d425d99da62957b8c5b747fa29284f0decd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Thei=C3=9Fen?= Date: Tue, 14 Jul 2020 19:21:32 +0200 Subject: [PATCH] Fix two minor warnings (#6650) * Unused import in no_std builds * Global attribute in non-root of a crate --- substrate/frame/babe/src/benchmarking.rs | 2 -- substrate/primitives/finality-grandpa/src/lib.rs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/substrate/frame/babe/src/benchmarking.rs b/substrate/frame/babe/src/benchmarking.rs index e168c1b93b..8ee4a5913c 100644 --- a/substrate/frame/babe/src/benchmarking.rs +++ b/substrate/frame/babe/src/benchmarking.rs @@ -17,8 +17,6 @@ //! Benchmarks for the BABE Pallet. -#![cfg_attr(not(feature = "std"), no_std)] - use super::*; use frame_benchmarking::benchmarks; diff --git a/substrate/primitives/finality-grandpa/src/lib.rs b/substrate/primitives/finality-grandpa/src/lib.rs index f99880041c..b38a327e44 100644 --- a/substrate/primitives/finality-grandpa/src/lib.rs +++ b/substrate/primitives/finality-grandpa/src/lib.rs @@ -31,7 +31,6 @@ use sp_std::borrow::Cow; use sp_std::vec::Vec; #[cfg(feature = "std")] use sp_core::traits::BareCryptoStorePtr; -use sp_std::convert::TryInto; #[cfg(feature = "std")] use log::debug; @@ -385,6 +384,7 @@ where { use sp_core::crypto::Public; use sp_application_crypto::AppKey; + use sp_std::convert::TryInto; let encoded = localized_payload(round, set_id, &message); let signature = keystore.read()