diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2019-04-23 13:21:47 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2019-04-23 15:51:59 +0200 |
commit | 95e4800ddf616649c93811678cdd2016a3ebb786 (patch) | |
tree | ccfe33e109709d273a9915617629b7c3085e932c | |
parent | 365219e5b2e4d98021c61587b0f49e67adc5c925 (diff) |
Make v1::types derive Eq, PartialEq, Ord, PartialOrd
-rw-r--r-- | librepology/src/v1/types.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/librepology/src/v1/types.rs b/librepology/src/v1/types.rs index 7f5276a..3f79c03 100644 --- a/librepology/src/v1/types.rs +++ b/librepology/src/v1/types.rs @@ -2,7 +2,7 @@ use std::ops::Deref; use url::Url; -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, PartialOrd, Ord, Clone, Debug, Serialize, Deserialize)] pub struct Package { /// name of repository for this package repo: Repo, @@ -71,7 +71,7 @@ impl Package { } -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, PartialOrd, Ord, Clone, Debug, Serialize, Deserialize)] pub struct Problem { #[serde(rename = "repo")] repo: Repo, @@ -112,7 +112,7 @@ impl Problem { } // name of repository for this package -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, PartialOrd, Ord, Clone, Debug, Serialize, Deserialize)] pub struct Repo(String); impl Deref for Repo { @@ -124,7 +124,7 @@ impl Deref for Repo { } // package name as in repository (if different from version) -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, PartialOrd, Ord, Clone, Debug, Serialize, Deserialize)] pub struct Name(String); impl Deref for Name { @@ -136,7 +136,7 @@ impl Deref for Name { } // package version (sanitized) -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, PartialOrd, Ord, Clone, Debug, Serialize, Deserialize)] pub struct Version(String); impl Deref for Version { @@ -148,7 +148,7 @@ impl Deref for Version { } // package status -#[derive(Clone, Debug, Serialize, Deserialize, Display)] +#[derive(Eq, PartialEq, Clone, Debug, Serialize, Deserialize, Display)] pub enum Status { #[serde(rename = "newest")] #[display(fmt = "newest")] @@ -192,7 +192,7 @@ pub enum Status { } // one-line description of the package -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, PartialOrd, Ord, Clone, Debug, Serialize, Deserialize)] pub struct Summary(String); impl Deref for Summary { @@ -204,7 +204,7 @@ impl Deref for Summary { } // list of package categories -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, PartialOrd, Ord, Clone, Debug, Serialize, Deserialize)] pub struct Category(String); impl Deref for Category { @@ -216,7 +216,7 @@ impl Deref for Category { } // list of package licenses -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, PartialOrd, Ord, Clone, Debug, Serialize, Deserialize)] pub struct License(String); impl Deref for License { @@ -228,7 +228,7 @@ impl Deref for License { } // list of package maintainers -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, PartialOrd, Ord, Clone, Debug, Serialize, Deserialize)] pub struct Maintainer(String); impl Deref for Maintainer { @@ -264,7 +264,7 @@ impl Deref for Download { } // list of package downloads -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Eq, PartialEq, PartialOrd, Ord, Clone, Debug, Serialize, Deserialize)] pub struct EffName(String); impl Deref for EffName { |