Преглед на файлове

fix warnings: keep no_std cfg attribute only in crate root

Mokhtar Naamani преди 6 години
родител
ревизия
a60d6253a7

+ 0 - 2
src/governance/council.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use rstd::prelude::*;
 use runtime_primitives::traits::{As, Zero};
 use srml_support::{decl_event, decl_module, decl_storage, ensure, StorageValue};

+ 0 - 2
src/governance/election.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use rstd::prelude::*;
 use srml_support::traits::Currency;
 use srml_support::{

+ 0 - 2
src/governance/mod.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use srml_support::traits::{Currency, LockableCurrency};
 use system;
 

+ 0 - 2
src/governance/sealed_vote.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use parity_codec::Encode;
 use rstd::vec::Vec;
 use srml_support::ensure;

+ 0 - 2
src/governance/stake.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use rstd::cmp::Ordering;
 use runtime_primitives::traits::SimpleArithmetic;
 

+ 0 - 2
src/membership/members.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use crate::governance::{BalanceOf, GovernanceCurrency};
 use crate::traits::{Members, Roles};
 use parity_codec::Codec;

+ 0 - 2
src/membership/mod.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 pub mod members;
 
 mod mock;

+ 0 - 2
src/memo.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use crate::governance::GovernanceCurrency;
 use rstd::prelude::*;
 use runtime_primitives::traits::Zero;

+ 0 - 2
src/migration.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use crate::governance::BalanceOf;
 use crate::membership::members;
 use crate::roles::actors;

+ 1 - 3
src/roles/actors.rs

@@ -1,12 +1,10 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use crate::governance::{BalanceOf, GovernanceCurrency};
 use parity_codec_derive::{Decode, Encode};
 use rstd::prelude::*;
 use runtime_primitives::traits::{As, Bounded, MaybeDebug, Zero};
 use srml_support::traits::Currency;
 use srml_support::{
-    decl_event, decl_module, decl_storage, dispatch, ensure, StorageMap, StorageValue,
+    decl_event, decl_module, decl_storage, ensure, StorageMap, StorageValue,
 };
 use system::{self, ensure_signed};
 

+ 0 - 2
src/roles/mod.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 pub mod actors;
 
 mod mock;

+ 0 - 2
src/storage/content_directory.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use crate::storage::data_object_type_registry::Trait as DOTRTrait;
 use crate::traits::Members;
 use parity_codec::Codec;

+ 0 - 2
src/storage/data_directory.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use crate::storage::data_object_type_registry::Trait as DOTRTrait;
 use crate::traits::{ContentIdExists, IsActiveDataObjectType, Members};
 use parity_codec::Codec;

+ 0 - 2
src/storage/data_object_storage_registry.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use crate::storage::data_directory::Trait as DDTrait;
 use crate::traits::{ContentHasStorage, ContentIdExists, Members};
 use parity_codec::Codec;

+ 0 - 2
src/storage/data_object_type_registry.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use crate::traits;
 use parity_codec::Codec;
 use parity_codec_derive::{Decode, Encode};

+ 0 - 2
src/storage/downloads.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 /*
  * XXX This module is not really supposed to be used this way, and therefore also lacks tests.
  *

+ 0 - 2
src/storage/mod.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 pub mod content_directory;
 pub mod data_directory;
 pub mod data_object_storage_registry;

+ 0 - 2
src/traits.rs

@@ -1,5 +1,3 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
 use crate::storage::{data_directory, data_object_storage_registry, data_object_type_registry};
 use parity_codec::Codec;
 use runtime_primitives::traits::{As, MaybeSerializeDebug, Member, SimpleArithmetic};