Fix docs on generate_storage_alias!. (#9314)

* Fix docs on `generate_storage_alias!`.

* Update frame/support/src/lib.rs

* Update frame/support/src/lib.rs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
chenwei
2021-07-13 18:43:57 +08:00
committed by GitHub
parent ea7c79dac4
commit d1ebd9841e
+5 -4
View File
@@ -115,11 +115,12 @@ impl TypeId for PalletId {
/// // generate a storage value with type u32.
/// generate_storage_alias!(Prefix, StorageName => Value<u32>);
///
/// // generate a double map from `(u32, u32)` (with hasher `Twox64Concat`) to `Vec<u8>`
/// // generate a double map from `(u32, u32)` (with hashers `Twox64Concat` for each key)
/// // to `Vec<u8>`
/// generate_storage_alias!(
/// OtherPrefix, OtherStorageName => DoubleMap<
/// (u32, u32),
/// (u32, u32),
/// (u32, Twox64Concat),
/// (u32, Twox64Concat),
/// Vec<u8>
/// >
/// );
@@ -127,7 +128,7 @@ impl TypeId for PalletId {
/// // generate a map from `Config::AccountId` (with hasher `Twox64Concat`) to `Vec<u8>`
/// trait Config { type AccountId: codec::FullCodec; }
/// generate_storage_alias!(
/// Prefix, GenericStorage<T: Config> => Map<(Twox64Concat, T::AccountId), Vec<u8>>
/// Prefix, GenericStorage<T: Config> => Map<(T::AccountId, Twox64Concat), Vec<u8>>
/// );
/// # fn main() {}
/// ```