| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2014-03-23 | use TotalEq for HashMap | Daniel Micay | -1/+1 | |
| Closes #5283 | ||||
| 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-24 | Move extra::json to libserialize | Alex Crichton | -1/+1 | |
| This also inverts the dependency between libserialize and libcollections. cc #8784 | ||||
| 2014-02-23 | Remove all ToStr impls, add Show impls | Alex Crichton | -1/+1 | |
| This commit changes the ToStr trait to: impl<T: fmt::Show> ToStr for T { fn to_str(&self) -> ~str { format!("{}", *self) } } The ToStr trait has been on the chopping block for quite awhile now, and this is the final nail in its coffin. The trait and the corresponding method are not being removed as part of this commit, but rather any implementations of the `ToStr` trait are being forbidden because of the generic impl. The new way to get the `to_str()` method to work is to implement `fmt::Show`. Formatting into a `&mut Writer` (as `format!` does) is much more efficient than `ToStr` when building up large strings. The `ToStr` trait forces many intermediate allocations to be made while the `fmt::Show` trait allows incremental buildup in the same heap allocated buffer. Additionally, the `fmt::Show` trait is much more extensible in terms of interoperation with other `Writer` instances and in more situations. By design the `ToStr` trait requires at least one allocation whereas the `fmt::Show` trait does not require any allocations. Closes #8242 Closes #9806 | ||||
| 2014-02-24 | Transition to new `Hash`, removing IterBytes and std::to_bytes. | Huon Wilson | -1/+1 | |
| 2014-02-20 | move enum_set to libcollections. #8784 | HeroesGrave | -0/+294 | |
