Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ pub struct DbDump {
/// <td>has_lib</td>
/// <td>bin_names</td>
/// <td>edition</td>
/// <td>description</td>
/// <td>homepage</td>
/// <td>documentation</td>
/// <td>repository</td>
/// </tr></table>
pub versions: Vec<versions::Row>,
}
16 changes: 16 additions & 0 deletions src/versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ pub struct Row {
pub has_lib: bool,
pub bin_names: Vec<String>,
pub edition: Option<u16>,
pub description: Option<String>,
pub homepage: Option<String>,
pub documentation: Option<String>,
pub repository: Option<String>,
}

impl<'de> Deserialize<'de> for Row {
Expand Down Expand Up @@ -82,6 +86,10 @@ impl<'de> Deserialize<'de> for Row {
#[serde(default, deserialize_with = "bin_names")]
bin_names: Vec<String>,
edition: Option<u16>,
description: Option<String>,
homepage: Option<String>,
documentation: Option<String>,
repository: Option<String>,
}

let Row {
Expand All @@ -103,6 +111,10 @@ impl<'de> Deserialize<'de> for Row {
has_lib,
bin_names,
edition,
description,
homepage,
documentation,
repository,
} = Row::deserialize(deserializer)?;
Ok(Self {
id,
Expand All @@ -122,6 +134,10 @@ impl<'de> Deserialize<'de> for Row {
has_lib,
bin_names,
edition,
description,
homepage,
documentation,
repository,
})
}
}
Expand Down