mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 01:07:57 +00:00
Rewrap all comments to 100 line width (#9490)
* reformat everything again * manual formatting * last manual fix * Fix build
This commit is contained in:
@@ -125,7 +125,8 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Remove a key from the map, returning the value at the key if the key was previously in the map.
|
||||
/// Remove a key from the map, returning the value at the key if the key was previously in the
|
||||
/// map.
|
||||
///
|
||||
/// The key may be any borrowed form of the map's key type, but the ordering on the borrowed
|
||||
/// form _must_ match the ordering on the key type.
|
||||
@@ -137,7 +138,8 @@ where
|
||||
self.0.remove(key)
|
||||
}
|
||||
|
||||
/// Remove a key from the map, returning the value at the key if the key was previously in the map.
|
||||
/// Remove a key from the map, returning the value at the key if the key was previously in the
|
||||
/// map.
|
||||
///
|
||||
/// The key may be any borrowed form of the map's key type, but the ordering on the borrowed
|
||||
/// form _must_ match the ordering on the key type.
|
||||
|
||||
@@ -160,8 +160,8 @@ pub trait StorageValue<T: FullCodec> {
|
||||
/// # Usage
|
||||
///
|
||||
/// This would typically be called inside the module implementation of on_runtime_upgrade, while
|
||||
/// ensuring **no usage of this storage are made before the call to `on_runtime_upgrade`**. (More
|
||||
/// precisely prior initialized modules doesn't make use of this storage).
|
||||
/// ensuring **no usage of this storage are made before the call to `on_runtime_upgrade`**.
|
||||
/// (More precisely prior initialized modules doesn't make use of this storage).
|
||||
fn translate<O: Decode, F: FnOnce(Option<O>) -> Option<T>>(f: F) -> Result<Option<T>, ()>;
|
||||
|
||||
/// Store a value under this key into the provided storage instance.
|
||||
@@ -989,7 +989,8 @@ impl<T> ChildTriePrefixIterator<T> {
|
||||
}
|
||||
|
||||
impl<T: Decode + Sized> ChildTriePrefixIterator<(Vec<u8>, T)> {
|
||||
/// Construct iterator to iterate over child trie items in `child_info` with the prefix `prefix`.
|
||||
/// Construct iterator to iterate over child trie items in `child_info` with the prefix
|
||||
/// `prefix`.
|
||||
///
|
||||
/// NOTE: Iterator with [`Self::drain`] will remove any value who failed to decode
|
||||
pub fn with_prefix(child_info: &ChildInfo, prefix: &[u8]) -> Self {
|
||||
@@ -1012,7 +1013,8 @@ impl<T: Decode + Sized> ChildTriePrefixIterator<(Vec<u8>, T)> {
|
||||
}
|
||||
|
||||
impl<K: Decode + Sized, T: Decode + Sized> ChildTriePrefixIterator<(K, T)> {
|
||||
/// Construct iterator to iterate over child trie items in `child_info` with the prefix `prefix`.
|
||||
/// Construct iterator to iterate over child trie items in `child_info` with the prefix
|
||||
/// `prefix`.
|
||||
///
|
||||
/// NOTE: Iterator with [`Self::drain`] will remove any key or value who failed to decode
|
||||
pub fn with_prefix_over_key<H: ReversibleStorageHasher>(
|
||||
|
||||
@@ -58,7 +58,8 @@ pub trait KeyGeneratorMaxEncodedLen: KeyGenerator {
|
||||
fn key_max_encoded_len() -> usize;
|
||||
}
|
||||
|
||||
/// A trait containing methods that are only implemented on the Key struct instead of the entire tuple.
|
||||
/// A trait containing methods that are only implemented on the Key struct instead of the entire
|
||||
/// tuple.
|
||||
pub trait KeyGeneratorInner: KeyGenerator {
|
||||
type Hasher: StorageHasher;
|
||||
|
||||
|
||||
@@ -39,10 +39,10 @@ pub use value::{StorageValue, StorageValueMetadata};
|
||||
/// Trait implementing how the storage optional value is converted into the queried type.
|
||||
///
|
||||
/// It is implemented by:
|
||||
/// * `OptionQuery` which convert an optional value to an optional value, user when querying
|
||||
/// storage will get an optional value.
|
||||
/// * `ValueQuery` which convert an optional value to a value, user when querying storage will get
|
||||
/// a value.
|
||||
/// * `OptionQuery` which convert an optional value to an optional value, user when querying storage
|
||||
/// will get an optional value.
|
||||
/// * `ValueQuery` which convert an optional value to a value, user when querying storage will get a
|
||||
/// value.
|
||||
pub trait QueryKindTrait<Value, OnEmpty> {
|
||||
/// Metadata for the storage kind.
|
||||
const METADATA: StorageEntryModifier;
|
||||
|
||||
@@ -270,8 +270,8 @@ impl<T, S> codec::DecodeLength for WeakBoundedVec<T, S> {
|
||||
}
|
||||
|
||||
// NOTE: we could also implement this as:
|
||||
// impl<T: Value, S1: Get<u32>, S2: Get<u32>> PartialEq<WeakBoundedVec<T, S2>> for WeakBoundedVec<T, S1>
|
||||
// to allow comparison of bounded vectors with different bounds.
|
||||
// impl<T: Value, S1: Get<u32>, S2: Get<u32>> PartialEq<WeakBoundedVec<T, S2>> for WeakBoundedVec<T,
|
||||
// S1> to allow comparison of bounded vectors with different bounds.
|
||||
impl<T, S> PartialEq for WeakBoundedVec<T, S>
|
||||
where
|
||||
T: PartialEq,
|
||||
|
||||
Reference in New Issue
Block a user