Skip to content

Commit

Permalink
fix doc and dyn (paritytech#8631)
Browse files Browse the repository at this point in the history
  • Loading branch information
gui1117 authored Apr 17, 2021
1 parent 22f09c6 commit 9531a1a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions frame/support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ impl TypeId for PalletId {
const TYPE_ID: [u8; 4] = *b"modl";
}

/// Generate a new type alias for [`storage::types::value::StorageValue`],
/// [`storage::types::value::StorageMap`] and [`storage::types::value::StorageDoubleMap`].
/// Generate a new type alias for [`storage::types::StorageValue`],
/// [`storage::types::StorageMap`] and [`storage::types::StorageDoubleMap`].
///
/// Useful for creating a *storage-like* struct for test and migrations.
///
Expand Down
6 changes: 3 additions & 3 deletions frame/support/src/storage/bounded_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,15 @@ impl<T: BoundedVecValue, S: Get<u32>> codec::DecodeLength for BoundedVec<T, S> {

impl<T: BoundedVecValue, S: Get<u32>> StorageDecodeLength for BoundedVec<T, S> {}

/// Storage value that is *maybe* capable of [`StorageAppend`].
/// Storage value that is *maybe* capable of [`StorageAppend`](crate::storage::StorageAppend).
pub trait TryAppendValue<T: BoundedVecValue, S: Get<u32>> {
/// Try and append the `item` into the storage item.
///
/// This might fail if bounds are not respected.
fn try_append<LikeT: EncodeLike<T>>(item: LikeT) -> Result<(), ()>;
}

/// Storage map that is *maybe* capable of [`StorageAppend`].
/// Storage map that is *maybe* capable of [`StorageAppend`](crate::storage::StorageAppend).
pub trait TryAppendMap<K: FullCodec, T: BoundedVecValue, S: Get<u32>> {
/// Try and append the `item` into the storage map at the given `key`.
///
Expand All @@ -233,7 +233,7 @@ pub trait TryAppendMap<K: FullCodec, T: BoundedVecValue, S: Get<u32>> {
) -> Result<(), ()>;
}

/// Storage double map that is *maybe* capable of [`StorageAppend`].
/// Storage double map that is *maybe* capable of [`StorageAppend`](crate::storage::StorageAppend).
pub trait TryAppendDoubleMap<K1: FullCodec, K2: FullCodec, T: BoundedVecValue, S: Get<u32>> {
/// Try and append the `item` into the storage double map at the given `key`.
///
Expand Down
2 changes: 1 addition & 1 deletion primitives/externalities/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ pub trait ExternalitiesExt {

impl ExternalitiesExt for &mut dyn Externalities {
fn extension<T: Any + Extension>(&mut self) -> Option<&mut T> {
self.extension_by_type_id(TypeId::of::<T>()).and_then(Any::downcast_mut)
self.extension_by_type_id(TypeId::of::<T>()).and_then(<dyn Any>::downcast_mut)
}

fn register_extension<T: Extension>(&mut self, ext: T) -> Result<(), Error> {
Expand Down

0 comments on commit 9531a1a

Please sign in to comment.