Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add PartialOrd and Ord to Version #45

Merged
merged 3 commits into from
May 29, 2024
Merged

Conversation

imabdulbasit
Copy link
Contributor

No description provided.

@imabdulbasit imabdulbasit requested review from jbearer and nyospe May 29, 2024 17:19
src/version.rs Outdated
@@ -3,7 +3,9 @@ use core::fmt::Debug;
use derive_more::Display;
use serde::{Deserialize, Serialize};

#[derive(Clone, Copy, Debug, Deserialize, Display, Eq, Hash, PartialEq, Serialize)]
#[derive(
Clone, Copy, Debug, Deserialize, Display, Eq, Hash, PartialEq, PartialOrd, Ord, Serialize,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aw, this breaks the nicely ordered derive list...

let v2 = Version { major: 1, minor: 3 };

assert!(v1 > v2);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corner case coverage would argue for also testing with 2.2 vs 1.3...

@imabdulbasit imabdulbasit merged commit 5acf179 into main May 29, 2024
8 checks passed
@imabdulbasit imabdulbasit deleted the abdul/add-derive-macro branch May 29, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants