change junction parachain id from named field to unnamed field (#2940)

* use unnamed field for parachain variant in junction

* remove outdated comment
This commit is contained in:
Guillaume Thiolliere
2021-04-27 14:49:55 +02:00
committed by GitHub
parent 55c1f7ea92
commit 41e57c4509
8 changed files with 38 additions and 42 deletions
+2 -6
View File
@@ -94,11 +94,7 @@ pub enum Junction {
/// An indexed parachain belonging to and operated by the context.
///
/// Generally used when the context is a Polkadot Relay-chain.
///
/// There is also `Parachain` which can be used in tests to avoid the faffy `{ id: ... }` syntax. Production
/// code should use this.
// TODO: parity-scale-codec#262: Change to be `Parachain(#[codec(compact)] u32)`
Parachain { #[codec(compact)] id: u32 },
Parachain(#[codec(compact)] u32),
/// A 32-byte identifier for an account of a specific network that is respected as a sovereign endpoint within
/// the context.
///
@@ -148,7 +144,7 @@ impl Junction {
match self {
Junction::Parent => false,
Junction::Parachain { .. }
Junction::Parachain(..)
| Junction::AccountId32 { .. }
| Junction::AccountIndex64 { .. }
| Junction::AccountKey20 { .. }