From 35e92e4055b8a6c6294602627896cc22d234c0bd Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 23 Apr 2019 16:49:30 +0200 Subject: Split types into module and submodules Without breaking the build because we reexport the private submodule types in the crate::v1::types module. --- librepology/src/v1/types/download.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 librepology/src/v1/types/download.rs (limited to 'librepology/src/v1/types/download.rs') diff --git a/librepology/src/v1/types/download.rs b/librepology/src/v1/types/download.rs new file mode 100644 index 0000000..e337baa --- /dev/null +++ b/librepology/src/v1/types/download.rs @@ -0,0 +1,16 @@ +use std::ops::Deref; + +use url::Url; + +// list of package downloads +#[derive(Eq, PartialEq, Clone, Debug, Serialize, Deserialize)] +pub struct Download(#[serde(with = "url_serde")] Url); + +impl Deref for Download { + type Target = Url; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + -- cgit v1.2.3