Use TypedLaneId instead of LaneId (#1738)

* TypedLaneId -> LaneId

* fix benchmarks compilation
This commit is contained in:
Svyatoslav Nikolsky
2022-12-30 12:09:19 +03:00
committed by Bastian Köcher
parent 41daa32acb
commit 03425b33ae
20 changed files with 65 additions and 50 deletions
+3 -3
View File
@@ -203,11 +203,11 @@ pub trait CliChain: relay_substrate_client::Chain {
/// Lane id.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct HexLaneId(pub LaneId);
pub struct HexLaneId(pub [u8; 4]);
impl From<HexLaneId> for LaneId {
fn from(lane_id: HexLaneId) -> LaneId {
lane_id.0
LaneId(lane_id.0)
}
}
@@ -215,7 +215,7 @@ impl std::str::FromStr for HexLaneId {
type Err = hex::FromHexError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
let mut lane_id = LaneId::default();
let mut lane_id = [0u8; 4];
hex::decode_to_slice(s, &mut lane_id)?;
Ok(HexLaneId(lane_id))
}