| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2014-03-15 | Remove std::cmp::cmp2. | Steven Fackler | -20/+0 | |
| It isn't used anywhere and `cmp2(a, b, c, d)` is identical to `(a, b).cmp(&(c, d))`. | ||||
| 2014-03-14 | cmp: switch `min` and `max` to `TotalOrd` | Daniel Micay | -2/+2 | |
| The `Float` trait provides correct `min` and `max` methods on floating point types, providing a consistent result regardless of the order the parameters are passed. These generic functions do not take the necessary performance hit to correctly support a partial order, so the true requirement should be given as a type bound. Closes #12712 | ||||
| 2014-03-07 | create a sensible comparison trait hierarchy | Daniel Micay | -6/+8 | |
| * `Ord` inherits from `Eq` * `TotalOrd` inherits from `TotalEq` * `TotalOrd` inherits from `Ord` * `TotalEq` inherits from `Eq` This is a partial implementation of #12517. | ||||
| 2014-02-28 | std: Change assert_eq!() to use {} instead of {:?} | Alex Crichton | -1/+1 | |
| Formatting via reflection has been a little questionable for some time now, and it's a little unfortunate that one of the standard macros will silently use reflection when you weren't expecting it. This adds small bits of code bloat to libraries, as well as not always being necessary. In light of this information, this commit switches assert_eq!() to using {} in the error message instead of {:?}. In updating existing code, there were a few error cases that I encountered: * It's impossible to define Show for [T, ..N]. I think DST will alleviate this because we can define Show for [T]. * A few types here and there just needed a #[deriving(Show)] * Type parameters needed a Show bound, I often moved this to `assert!(a == b)` * `Path` doesn't implement `Show`, so assert_eq!() cannot be used on two paths. I don't think this is much of a regression though because {:?} on paths looks awful (it's a byte array). Concretely speaking, this shaved 10K off a 656K binary. Not a lot, but sometime significant for smaller binaries. | ||||
| 2014-02-13 | Removed num::Orderable | Michael Darakananda | -0/+2 | |
| 2014-01-09 | Remove ApproxEq and assert_approx_eq! | Brendan Zabarauskas | -7/+0 | |
| This trait seems to stray too far from the mandate of a standard library as implementations may vary between use cases. | ||||
| 2013-08-30 | Now inline default 'ne' methods | Eric Martin | -0/+2 | |
| 2013-08-09 | Remove redundant Ord method impls. | OGINO Masanori | -6/+3 | |
| Basically, generic containers should not use the default methods since a type of elements may not guarantees total order. str could use them since u8's Ord guarantees total order. Floating point numbers are also broken with the default methods because of NaN. Thanks for @thestinger. Timespec also guarantees total order AIUI. I'm unsure whether extra::semver::Identifier does so I left it alone. Proof needed. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com> | ||||
| 2013-08-04 | syntax: make #[deriving(TotalOrd)] lazy. | Huon Wilson | -1/+0 | |
| Previously it would call: f(sf1.cmp(&of1), f(sf2.cmp(&of2), ...)) (where s/of1 = 'self/other field 1', and f was std::cmp::lexical_ordering) This meant that every .cmp subcall got evaluated when calling a derived TotalOrd.cmp. This corrects this to use let test = sf1.cmp(&of1); if test == Equal { let test = sf2.cmp(&of2); if test == Equal { // ... } else { test } } else { test } This gives a lexical ordering by short-circuiting on the first comparison that is not Equal. | ||||
| 2013-08-03 | remove obsolete `foreach` keyword | Daniel Micay | -1/+1 | |
| this has been replaced by `for` | ||||
| 2013-08-03 | make `for` parse as `foreach` does | Daniel Micay | -1/+3 | |
| Closes #6997 | ||||
| 2013-07-25 | auto merge of #8030 : thestinger/rust/iterator, r=huonw | bors | -1/+0 | |
| 2013-07-24 | rm default method lint | Daniel Micay | -1/+0 | |
| default methods are enabled by default, so there's not much point in keeping around a lint to report them as being experimental | ||||
| 2013-07-23 | Fix some impls such that all supertraits are actually implemented. | Michael Sullivan | -0/+6 | |
| 2013-07-15 | cmp: Use default methods in trait Eq, require only Eq::eq | blake2-ppc | -2/+4 | |
| 2013-07-13 | cmp: Use default methods in trait Ord, only require Ord::lt | blake2-ppc | -8/+9 | |
| It will be simpler to implement only one method for Ord, while we also allow implementing all four Ord methods for semantics or performance reasons. We only supply three default methods (and not four), because don't have any nice error reporting for the case where at least one method must be implemented, but it's arbitrary which. | ||||
| 2013-06-18 | replace #[inline(always)] with #[inline]. r=burningtree. | Graydon Hoare | -10/+10 | |
| 2013-06-09 | cmp: remove duplicate free functions | Daniel Micay | -30/+0 | |
| 2013-05-30 | Require documentation by default for libstd | Alex Crichton | -0/+2 | |
| Adds documentation for various things that I understand. Adds #[allow(missing_doc)] for lots of things that I don't understand. | ||||
| 2013-05-22 | libstd: Rename libcore to libstd and libstd to libextra; update makefiles. | Patrick Walton | -0/+265 | |
| This only changes the directory names; it does not change the "real" metadata names. | ||||
| 2013-05-06 | Move FuzzyEq trait into core::cmp and rename it to 'ApproxEq' | Brendan Zabarauskas | -102/+0 | |
| 2013-05-02 | mod items need to be marked with `cfg(test)` not `test`. | Felix S. Klock II | -1/+1 | |
| 2013-03-29 | librustc: Remove `fail_unless!` | Patrick Walton | -10/+10 | |
| 2013-03-22 | librustc: Remove the `const` declaration form everywhere | Patrick Walton | -1/+1 | |
| 2013-03-22 | libstd: Remove all uses of `pure` from libstd. rs=depure | Patrick Walton | -10/+10 | |
| 2013-03-07 | librustc: Convert all uses of `assert` over to `fail_unless!` | Patrick Walton | -10/+10 | |
| 2013-02-14 | librustc: Replace `impl Type : Trait` with `impl Trait for Type`. ↵ | Patrick Walton | -4/+4 | |
| rs=implflipping | ||||
| 2013-02-07 | auto merge of #4831 : bjz/rust/incoming, r=pcwalton | bors | -9/+46 | |
| This is useful for comparing more complex types that include floats. | ||||
| 2013-02-07 | Make ~fn non-copyable, make &fn copyable, split barefn/closure types, | Niko Matsakis | -1/+0 | |
| correct handling of moves for struct-record update. Part of #3678. Fixes #2828, #3904, #4719. | ||||
| 2013-02-07 | Add type parameter for epsilon value | Brendan Zabarauskas | -5/+42 | |
| 2013-02-07 | Convert fuzzy_epsilon constant to upper case and make public | Brendan Zabarauskas | -4/+4 | |
| 2013-01-30 | librustc: Change `self` as a type to `Self` everywhere. r=brson | Patrick Walton | -2/+2 | |
| 2013-01-30 | rustc: make integral type inference transactional, close #3211, close #4401, ↵ | Graydon Hoare | -3/+3 | |
| close #3398. | ||||
| 2013-01-29 | Merge pull request #4676 from thestinger/fuzzy | Tim Chevalier | -3/+3 | |
| fix FuzzyEq | ||||
| 2013-01-29 | fix FuzzyEq | Daniel Micay | -3/+3 | |
| 2013-01-29 | Fix licenseck to allow 2012-2013 as the year range | Tim Chevalier | -2/+2 | |
| 2013-01-29 | implement fuzzy_eq with fuzzy_eq_eps | Daniel Micay | -4/+4 | |
| 2013-01-28 | add a FuzzyEq method that accepts an epsilon value | Daniel Micay | -1/+20 | |
| 2013-01-28 | update FuzzyEq to explicit self | Daniel Micay | -11/+10 | |
| 2013-01-28 | fix std::cmp docstring | Daniel Micay | -1/+1 | |
| 2012-12-27 | librustc: Terminate name searches at the nearest module scope for paths that ↵ | Patrick Walton | -0/+4 | |
| contain at least two components. r=graydon | ||||
| 2012-12-03 | Update license, add license boilerplate to most files. Remainder will follow. | Graydon Hoare | -0/+10 | |
| 2012-09-28 | std: Eliminate deprecated patterns | Brian Anderson | -1/+0 | |
| 2012-09-27 | De-export std::{base64,cmp,par}. Part of #3583. | Graydon Hoare | -1/+1 | |
| 2012-09-02 | std: warn(non_camel_case_types) everywhere. still some exceptions | Brian Anderson | -1/+0 | |
| 2012-08-31 | Remove deprecated modes from FuzzyEq in cmp.rs | Kevin Cantu | -10/+12 | |
| This commit may require changes to the following Servo files: * rust-geom/matrix.rs * servo/platform/osmain.rs * rust-layers/layers.rs * rust-geom/matrix.rs | ||||
| 2012-08-28 | CamelCasify lots of std | Ben Striegel | -4/+5 | |
| 2012-08-08 | Convert impls to new syntax | Brian Anderson | -3/+3 | |
| 2012-08-01 | Convert ret to return | Brian Anderson | -3/+3 | |
| 2012-07-26 | core: Mark a bunch of numeric functions as pure | Patrick Walton | -5/+5 | |
