fix: Use correct struct for metadatum labels (#96)
This commit is contained in:
parent
2b8eabdde9
commit
5c6979d3e5
2 changed files with 5 additions and 3 deletions
|
|
@ -377,7 +377,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A uint structure that preserves original int length
|
/// A uint structure that preserves original int length
|
||||||
#[derive(Debug, PartialEq, Copy, Clone, PartialOrd)]
|
#[derive(Debug, PartialEq, Copy, Clone, PartialOrd, Eq, Ord)]
|
||||||
pub enum AnyUInt {
|
pub enum AnyUInt {
|
||||||
MajorByte(u8),
|
MajorByte(u8),
|
||||||
U8(u8),
|
U8(u8),
|
||||||
|
|
|
||||||
|
|
@ -1230,7 +1230,7 @@ pub enum Metadatum {
|
||||||
Bytes(ByteVec),
|
Bytes(ByteVec),
|
||||||
Text(String),
|
Text(String),
|
||||||
Array(MaybeIndefArray<Metadatum>),
|
Array(MaybeIndefArray<Metadatum>),
|
||||||
Map(Metadata),
|
Map(KeyValuePairs<Metadatum, Metadatum>),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'b> minicbor::Decode<'b> for Metadatum {
|
impl<'b> minicbor::Decode<'b> for Metadatum {
|
||||||
|
|
@ -1310,7 +1310,9 @@ impl minicbor::Encode for Metadatum {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type Metadata = KeyValuePairs<Metadatum, Metadatum>;
|
pub type MetadatumLabel = AnyUInt;
|
||||||
|
|
||||||
|
pub type Metadata = KeyValuePairs<MetadatumLabel, Metadatum>;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum AuxiliaryData {
|
pub enum AuxiliaryData {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue