mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Implement MaxEncodedLen on pallet-beefy (#11584)
* Implement MaxEncodedLen on pallet-beefy * Return Result in intialize_authorities * Update docs * Log error when authorities list gets truncated * Update frame/beefy/src/lib.rs Co-authored-by: Adrian Catangiu <adrian@parity.io> * cargo fmt Co-authored-by: Adrian Catangiu <adrian@parity.io>
This commit is contained in:
@@ -146,6 +146,15 @@ impl<'a, T, S> From<BoundedSlice<'a, T, S>> for &'a [T] {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T, S> Clone for BoundedSlice<'a, T, S> {
|
||||
fn clone(&self) -> Self {
|
||||
BoundedSlice(self.0, PhantomData)
|
||||
}
|
||||
}
|
||||
|
||||
// Since a reference `&T` is always `Copy`, so is `BoundedSlice<'a, T, S>`.
|
||||
impl<'a, T, S> Copy for BoundedSlice<'a, T, S> {}
|
||||
|
||||
impl<'a, T, S> sp_std::iter::IntoIterator for BoundedSlice<'a, T, S> {
|
||||
type Item = &'a T;
|
||||
type IntoIter = sp_std::slice::Iter<'a, T>;
|
||||
|
||||
Reference in New Issue
Block a user