Skip to content

Commit

Permalink
Add trait bounds to config: Index: Default, `BlockNumber: AtLeast32…
Browse files Browse the repository at this point in the history
…BitsUnsigned` (#648)

* add `AtLeast32BitUnsigned` trait bound for `Config::BlockNumber`

* add default trait bound for `Config::Index`
  • Loading branch information
clangenb authored Sep 25, 2023
1 parent d39feb0 commit dc012e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions primitives/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub trait Config {
/// transactions associated with a sender account.
/// This type enforces the (de)serialization implementation
/// also in no-std mode (unlike substrates MaybeSerializeDeserialize).
type Index: Debug + Copy + DeserializeOwned + AtLeast32Bit + Decode;
type Index: Default + Debug + Copy + DeserializeOwned + AtLeast32Bit + Decode;

/// The block number type used by the runtime.
type BlockNumber: Debug
Expand All @@ -45,7 +45,8 @@ pub trait Config {
+ DeserializeOwned
+ core::hash::Hash
+ core::str::FromStr
+ Into<u64>;
+ Into<u64>
+ AtLeast32BitUnsigned;

/// The output of the `Hashing` function.
type Hash: Debug
Expand Down

0 comments on commit dc012e4

Please sign in to comment.