1
Fork 0

hostmeta: Property.r#type to Property.rel

This commit is contained in:
Steffo 2024-11-16 01:41:57 +01:00
parent 72f3669ef1
commit 8b5408f21e
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0
2 changed files with 4 additions and 4 deletions

View file

@ -219,7 +219,7 @@ impl From<ResourceDescriptorLinkXRD> for ResourceDescriptorLinkJRD {
impl From<ResourceDescriptorPropertyXRD> for (String, Option<String>) {
fn from(value: ResourceDescriptorPropertyXRD) -> Self {
(value.r#type, value.value)
(value.rel, value.value)
}
}

View file

@ -133,8 +133,8 @@ pub struct ResourceDescriptorTitleXRD {
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ResourceDescriptorPropertyXRD {
/// The property identifier, or type.
#[serde(rename = "@type")]
pub r#type: String,
#[serde(rename = "@rel")]
pub rel: String,
/// The property value.
#[serde(rename = "$text")]
@ -236,7 +236,7 @@ impl From<ResourceDescriptorJRD> for ResourceDescriptorXRD {
impl From<(String, Option<String>)> for ResourceDescriptorPropertyXRD {
fn from(value: (String, Option<String>)) -> Self {
Self {
r#type: value.0,
rel: value.0,
value: value.1,
}
}