Bound Unsigned when signed is not supported. (#6367)

* bound unsigned when necessary

* convert more type to AtLeast32BitUnsigned

* Update primitives/arithmetic/src/traits.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* doc refactor

* line reorganize

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
Guillaume Thiolliere
2020-06-25 11:30:20 +02:00
committed by GitHub
parent b17ccf24a8
commit 44fb311f1f
16 changed files with 84 additions and 74 deletions
+2 -2
View File
@@ -134,7 +134,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
use frame_support::{Parameter, decl_module, decl_event, decl_storage, decl_error, ensure};
use sp_runtime::traits::{Member, AtLeast32Bit, Zero, StaticLookup};
use sp_runtime::traits::{Member, AtLeast32Bit, AtLeast32BitUnsigned, Zero, StaticLookup};
use frame_system::{self as system, ensure_signed};
use sp_runtime::traits::One;
@@ -144,7 +144,7 @@ pub trait Trait: frame_system::Trait {
type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
/// The units in which we record balances.
type Balance: Member + Parameter + AtLeast32Bit + Default + Copy;
type Balance: Member + Parameter + AtLeast32BitUnsigned + Default + Copy;
/// The arithmetic type of asset identifier.
type AssetId: Parameter + AtLeast32Bit + Default + Copy;