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

make small_version fit in a ptr #6

Merged
merged 12 commits into from
Jan 8, 2025
Next Next commit
make small_version fit in a ptr
  • Loading branch information
Eh2406 committed Jan 2, 2025
commit 0935cfcbb324bd53cb3ac9bc28415b90e1b28e32
4 changes: 2 additions & 2 deletions examples/crates-vers/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ fn main() {
assert_eq!(v1.patch, s1.patch());
assert_eq!(v1.pre.as_str(), s1.pre());
// small version round trips
let v: Version = s.into_version();
let v: Version = s1.into_version();
assert_eq!(v1, &v);
for v2 in &versions {
let s2: SmallVersion = v2.into();
assert_eq!(s1.cmp(&s2), v1.cmp(v2));
assert_eq!(s1.cmp(&s2), v1.cmp(v2), "{v1} {s1:#?} cmp {v2} {s2:#?} ");
assert_eq!(s1 == s2, v1 == v2);
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use semver::{BuildMetadata, Comparator, Op, Prerelease, Version, VersionReq};

mod bump_helpers;
mod semver_compatibility;
mod version_like;
mod small_version;
mod version_like;

pub use semver_compatibility::SemverCompatibility;
pub use small_version::SmallVersion;
Expand Down
Loading