about summary refs log tree commit diff
path: root/src/libstd/fmt.rs
AgeCommit message (Collapse)AuthorLines
2014-05-28std: Remove format_strbuf!()Alex Crichton-7/+0
This was only ever a transitionary macro.
2014-05-27Move std::{reflect,repr,Poly} to a libdebug crateAlex Crichton-19/+31
This commit moves reflection (as well as the {:?} format modifier) to a new libdebug crate, all of which is marked experimental. This is a breaking change because it now requires the debug crate to be explicitly linked if the :? format qualifier is used. This means that any code using this feature will have to add `extern crate debug;` to the top of the crate. Any code relying on reflection will also need to do this. Closes #12019 [breaking-change]
2014-05-27std: Rename strbuf operations to stringRicho Healey-2/+2
[breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-12/+12
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-5/+5
[breaking-change]
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-8/+8
2014-05-15core: Update all tests for fmt movementAlex Crichton-2/+10
2014-05-15std: Fix float testsAlex Crichton-3/+0
2014-05-15std: Delegate some integer formatting to core::fmtAlex Crichton-1/+1
In an attempt to phase out the std::num::strconv module's string formatting functionality, this commit reimplements some provided methods for formatting integers on top of format!() instead of the custom (and slower) implementation inside of num::strconv. Primarily, this deprecates int_to_str_bytes_common
2014-05-15Updates with core::fmt changesAlex Crichton-1/+1
1. Wherever the `buf` field of a `Formatter` was used, the `Formatter` is used instead. 2. The usage of `write_fmt` is minimized as much as possible, the `write!` macro is preferred wherever possible. 3. Usage of `fmt::write` is minimized, favoring the `write!` macro instead.
2014-05-15core: Inherit the std::fmt moduleAlex Crichton-0/+583
This commit moves all possible functionality from the standard library's string formatting utilities into the core library. This is a breaking change, due to a few tweaks in the semantics of formatting: 1. In order to break the dependency on the std::io module, a new trait, FormatWriter was introduced in core::fmt. This is the trait which is used (instead of Writer) to format data into a stream. 2. The new FormatWriter trait has one method, write(), which takes some bytes and can return an error, but the error contains very little information. The intent for this trait is for an adaptor writer to be used around the standard library's Writer trait. 3. The fmt::write{,ln,_unsafe} methods no longer take &mut io::Writer, but rather &mut FormatWriter. Since this trait is less common, all functions were removed except fmt::write, and it is not intended to be invoked directly. The main API-breaking change here is that the fmt::Formatter structure will no longer expose its `buf` field. All previous code writing directly to `f.buf` using writer methods or the `write!` macro will now instead use `f` directly. The Formatter object itself implements the `Writer` trait itself for convenience, although it does not implement the `FormatWriter` trait. The fallout of these changes will be in the following commits. [breaking-change]