mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
Companion for Substrate#10655 (#4765)
* Companion for Substrate#10655 https://github.com/paritytech/substrate/pull/10655 This removes the last usages of `Default` in conjunction with `AccountId` * More fixes * More of them! * FMT * Update Substrate
This commit is contained in:
@@ -305,11 +305,11 @@ impl<'a> parity_scale_codec::Input for TrailingZeroInput<'a> {
|
||||
|
||||
/// Format is b"para" ++ encode(parachain ID) ++ 00.... where 00... is indefinite trailing
|
||||
/// zeroes to fill [`AccountId`].
|
||||
impl<T: Encode + Decode + Default> AccountIdConversion<T> for Id {
|
||||
impl<T: Encode + Decode> AccountIdConversion<T> for Id {
|
||||
fn into_account(&self) -> T {
|
||||
(b"para", self)
|
||||
.using_encoded(|b| T::decode(&mut TrailingZeroInput(b)))
|
||||
.unwrap_or_default()
|
||||
.expect("infinite length input; no invalid inputs for type; qed")
|
||||
}
|
||||
|
||||
fn try_from_account(x: &T) -> Option<Self> {
|
||||
|
||||
Reference in New Issue
Block a user