Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
fix rust docs for remove storage prefix and take storage item (#9544)
Browse files Browse the repository at this point in the history
  • Loading branch information
4meta5 committed Aug 12, 2021
1 parent 09c016b commit 2717d98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frame/support/src/storage/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ pub fn put_storage_value<T: Encode>(module: &[u8], item: &[u8], hash: &[u8], val
frame_support::storage::unhashed::put(&key, &value);
}

/// Get a particular value in storage by the `module`, the map's `item` name and the key `hash`.
/// Remove all items under a storage prefix by the `module`, the map's `item` name and the key `hash`.
pub fn remove_storage_prefix(module: &[u8], item: &[u8], hash: &[u8]) {
let mut key = vec![0u8; 32 + hash.len()];
key[0..16].copy_from_slice(&Twox128::hash(module));
Expand All @@ -258,7 +258,7 @@ pub fn remove_storage_prefix(module: &[u8], item: &[u8], hash: &[u8]) {
frame_support::storage::unhashed::kill_prefix(&key, None);
}

/// Get a particular value in storage by the `module`, the map's `item` name and the key `hash`.
/// Take a particular item in storage by the `module`, the map's `item` name and the key `hash`.
pub fn take_storage_item<K: Encode + Sized, T: Decode + Sized, H: StorageHasher>(
module: &[u8],
item: &[u8],
Expand Down

0 comments on commit 2717d98

Please sign in to comment.