summary refs log tree commit diff
path: root/src/libnum/rational.rs
AgeCommit message (Collapse)AuthorLines
2014-03-24Correct issue workaround referencesSteven Stewart-Gallus-2/+2
2014-03-23std: remove the `equals` method from `TotalEq`.Huon Wilson-3/+3
`TotalEq` is now just an assertion about the `Eq` impl of a type (i.e. `==` is a total equality if a type implements `TotalEq`) so the extra method is just confusing. Also, a new method magically appeared as a hack to allow deriving to assert that the contents of a struct/enum are also TotalEq, because the deriving infrastructure makes it very hard to do anything but create a trait method. (You didn't hear about this horrible work-around from me :(.)
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-5/+6
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-1/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-1/+1
Closes #12771
2014-03-16num: Migrate `~[T]` to `std::vec_ng::Vec`Florian Zeitz-6/+7
2014-02-24Remove std::num::ToStrRadix from the preludeBrendan Zabarauskas-1/+1
2014-02-23Remove all ToStr impls, add Show implsAlex Crichton-3/+4
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-22Move std::num::Integer to libnumBrendan Zabarauskas-0/+2
2014-02-20move extra::test to libtestLiigo Zhuang-2/+1
2014-02-13Removed num::OrderableMichael Darakananda-19/+0
2014-02-11Factoring bigint, rational, and complex out of libextra into libnum.Felix S. Klock II-0/+681
Removed use of globs present in earlier versions of modules. Fix tutorial.md to reflect `extra::rational` ==> `num::rational`.