Skip to content

Commit

Permalink
Update substrate/primitives/runtime/src/type_with_default.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
codekitz and ggwpez authored May 3, 2024
1 parent b07deeb commit c731b87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions substrate/primitives/runtime/src/type_with_default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ use sp_core::Get;
use serde::{Deserialize, Serialize};

/// A type that wraps another type and provides a default value.
///
/// Passes through arithmetical and many other operations to the inner value.
#[derive(Encode, Decode, TypeInfo, Debug, MaxEncodedLen)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct TypeWithDefault<T, D: Get<T>>(T, PhantomData<D>);
Expand Down

0 comments on commit c731b87

Please sign in to comment.