1
Fork 0

Create webfinger crate #5

Merged
steffo merged 53 commits from feature/webfinger into main 2024-11-16 06:33:06 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 8b5408f21e - Show all commits

View file

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