]> git.lizzy.rs Git - rust.git/commit
auto merge of #7726 : omasanori/rust/semver-2.0.0, r=graydon
authorbors <bors@rust-lang.org>
Tue, 16 Jul 2013 16:31:28 +0000 (09:31 -0700)
committerbors <bors@rust-lang.org>
Tue, 16 Jul 2013 16:31:28 +0000 (09:31 -0700)
commita317584e4f7643c862e94138eb210ce154974d0e
tree78988a434c8f3e5a1490eb48b28059a886793894
parent274e7a4e4999fe4e59a8ab0d71555f7f3eea3d6f
parent31d29d394f817580cacf0962bd8c2272c8b817db
auto merge of #7726 : omasanori/rust/semver-2.0.0, r=graydon

The Ord impl of Version refered to the algorithm in release candidate versions of semver. [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html) says, "Build metadata SHOULD be ignored when determining version precedence."

Note that Version's `le` is not "less than or equal to" now, since `lt` ignores build metadata. I think the new ordering algorithm satisfies strict weak ordering which C++ STL requires, instead of strict total ordering.

BTW, is `a || b || ... || x`-style code better or idiomatic in Rust than `if a { return true; } if b { return true; } ... if x { return true; } return false;`-style one?