diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2019-04-24 09:44:03 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2019-04-24 10:00:15 +0200 |
commit | 5f34e97efb8d67d7b3763d53d747d06661bde558 (patch) | |
tree | da74650c8597fed1f194a123aa8d610943428f71 | |
parent | fcf973c16d4128dda76b809b0d5b9a2635afae47 (diff) |
types: Add "new" derive
-rw-r--r-- | librepology/src/v1/types/category.rs | 2 | ||||
-rw-r--r-- | librepology/src/v1/types/download.rs | 2 | ||||
-rw-r--r-- | librepology/src/v1/types/effname.rs | 2 | ||||
-rw-r--r-- | librepology/src/v1/types/license.rs | 2 | ||||
-rw-r--r-- | librepology/src/v1/types/maintainer.rs | 2 | ||||
-rw-r--r-- | librepology/src/v1/types/name.rs | 2 | ||||
-rw-r--r-- | librepology/src/v1/types/repo.rs | 2 | ||||
-rw-r--r-- | librepology/src/v1/types/summary.rs | 2 | ||||
-rw-r--r-- | librepology/src/v1/types/version.rs | 2 | ||||
-rw-r--r-- | librepology/src/v1/types/www.rs | 2 |
10 files changed, 10 insertions, 10 deletions
diff --git a/librepology/src/v1/types/category.rs b/librepology/src/v1/types/category.rs index 1bc8c02..975fe7f 100644 --- a/librepology/src/v1/types/category.rs +++ b/librepology/src/v1/types/category.rs @@ -1,7 +1,7 @@ use std::ops::Deref; // list of package categories -#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize, new)] pub struct Category(String); impl Deref for Category { diff --git a/librepology/src/v1/types/download.rs b/librepology/src/v1/types/download.rs index e337baa..d52a2db 100644 --- a/librepology/src/v1/types/download.rs +++ b/librepology/src/v1/types/download.rs @@ -3,7 +3,7 @@ use std::ops::Deref; use url::Url; // list of package downloads -#[derive(Eq, PartialEq, Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, Clone, Debug, Serialize, Deserialize, new)] pub struct Download(#[serde(with = "url_serde")] Url); impl Deref for Download { diff --git a/librepology/src/v1/types/effname.rs b/librepology/src/v1/types/effname.rs index ae38fd7..118f56e 100644 --- a/librepology/src/v1/types/effname.rs +++ b/librepology/src/v1/types/effname.rs @@ -1,7 +1,7 @@ use std::ops::Deref; // list of package downloads -#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize, new)] pub struct EffName(String); impl Deref for EffName { diff --git a/librepology/src/v1/types/license.rs b/librepology/src/v1/types/license.rs index 7d67a2e..f755888 100644 --- a/librepology/src/v1/types/license.rs +++ b/librepology/src/v1/types/license.rs @@ -1,7 +1,7 @@ use std::ops::Deref; // list of package licenses -#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize, new)] pub struct License(String); impl Deref for License { diff --git a/librepology/src/v1/types/maintainer.rs b/librepology/src/v1/types/maintainer.rs index d76c879..f97fc91 100644 --- a/librepology/src/v1/types/maintainer.rs +++ b/librepology/src/v1/types/maintainer.rs @@ -1,7 +1,7 @@ use std::ops::Deref; // list of package maintainers -#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize, new)] pub struct Maintainer(String); impl Deref for Maintainer { diff --git a/librepology/src/v1/types/name.rs b/librepology/src/v1/types/name.rs index 649e70d..70e3317 100644 --- a/librepology/src/v1/types/name.rs +++ b/librepology/src/v1/types/name.rs @@ -1,7 +1,7 @@ use std::ops::Deref; // package name as in repository (if different from version) -#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize, new)] pub struct Name(String); impl Deref for Name { diff --git a/librepology/src/v1/types/repo.rs b/librepology/src/v1/types/repo.rs index 7305ec6..062358e 100644 --- a/librepology/src/v1/types/repo.rs +++ b/librepology/src/v1/types/repo.rs @@ -1,7 +1,7 @@ use std::ops::Deref; // name of repository for this package -#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize, new)] pub struct Repo(String); impl Deref for Repo { diff --git a/librepology/src/v1/types/summary.rs b/librepology/src/v1/types/summary.rs index 494e671..0595fef 100644 --- a/librepology/src/v1/types/summary.rs +++ b/librepology/src/v1/types/summary.rs @@ -1,7 +1,7 @@ use std::ops::Deref; // one-line description of the package -#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize, new)] pub struct Summary(String); impl Deref for Summary { diff --git a/librepology/src/v1/types/version.rs b/librepology/src/v1/types/version.rs index cad703a..7ae7b85 100644 --- a/librepology/src/v1/types/version.rs +++ b/librepology/src/v1/types/version.rs @@ -1,7 +1,7 @@ use std::ops::Deref; // package version (sanitized) -#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Debug, Serialize, Deserialize, new)] pub struct Version(String); impl Deref for Version { diff --git a/librepology/src/v1/types/www.rs b/librepology/src/v1/types/www.rs index a59ef02..1b5b89e 100644 --- a/librepology/src/v1/types/www.rs +++ b/librepology/src/v1/types/www.rs @@ -2,7 +2,7 @@ use std::ops::Deref; use url::Url; // list of package webpages -#[derive(Eq, PartialEq, Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, Clone, Debug, Serialize, Deserialize, new)] pub struct Www(#[serde(with = "url_serde")] Url); impl Deref for Www { |