Skip to content

Finish portions of ifmt! #8446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed

Conversation

alexcrichton
Copy link
Member

This includes a number of improvements to ifmt!

  • Implements formatting arguments -- {:0.5x} works now
  • Formatting now works on all integer widths, not just int and uint
  • Added a large doc block to std::fmt which should help explain what ifmt! is all about
  • Added floating point formatters, although they have the same pitfalls from before (they're just proof-of-concept now)

Closed a couple of issues along the way, yay! Once this gets into a snapshot, I'll start looking into removing all of fmt

@graydon
Copy link
Contributor

graydon commented Aug 11, 2013

\o/

@alexcrichton
Copy link
Member Author

By the way, I'm sure I've left out things which need to be documented, so if anyone wants some more explanation of what ifmt! is or how it works, I'd be more than willing to write up some more documentation on it!

Currently the work just the same as the old `extfmt` versions
bors added a commit that referenced this pull request Aug 14, 2013
This includes a number of improvements to `ifmt!`

* Implements formatting arguments -- `{:0.5x}` works now
* Formatting now works on all integer widths, not just `int` and `uint`
* Added a large doc block to `std::fmt` which should help explain what `ifmt!` is all about
* Added floating point formatters, although they have the same pitfalls from before (they're just proof-of-concept now)

Closed a couple of issues along the way, yay! Once this gets into a snapshot, I'll start looking into removing all of `fmt`
Because formatting is done via traits, there is no requirement that the
`d` format actually takes an `int`, but rather it simply requires a type which
ascribes to the `Signed` formatting trait. There are various parameters which do
require a particular type, however. Namely if the sytnax `{:.*s}` is used, then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"sytnax" should be "syntax".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hijacked #8485 to fix the typo, thanks!

@bors bors closed this Aug 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants