From 718ad68bf2b414f3fe3eb88a8b88aab1dce4428f Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sun, 26 Mar 2017 16:49:12 +0200 Subject: [PATCH] Derive `Eq` for `VersionReq` Seems to make sense to me. `Version` already implements it. --- src/version_req.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/version_req.rs b/src/version_req.rs index 34379335..9b4c4e4e 100644 --- a/src/version_req.rs +++ b/src/version_req.rs @@ -23,7 +23,7 @@ use self::ReqParseError::*; /// A `VersionReq` is a struct containing a list of predicates that can apply to ranges of version /// numbers. Matching operations can then be done with the `VersionReq` against a particular /// version to see if it satisfies some or all of the constraints. -#[derive(PartialEq,Clone,Debug)] +#[derive(PartialEq, Eq, Clone, Debug)] pub struct VersionReq { predicates: Vec, } @@ -34,14 +34,14 @@ impl From for VersionReq { } } -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug)] enum WildcardVersion { Major, Minor, Patch, } -#[derive(PartialEq,Clone,Debug)] +#[derive(PartialEq, Eq, Clone, Debug)] enum Op { Ex, // Exact Gt, // Greater than @@ -75,7 +75,7 @@ impl From for Op { } } -#[derive(PartialEq,Clone,Debug)] +#[derive(PartialEq, Eq, Clone, Debug)] struct Predicate { op: Op, major: u64,