Skip to content
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

Formatting chapter: Add example about Show #198

Merged
merged 2 commits into from
Jul 26, 2014
Merged

Formatting chapter: Add example about Show #198

merged 2 commits into from
Jul 26, 2014

Conversation

japaric
Copy link
Member

@japaric japaric commented Jul 23, 2014

Rebased #129, dealt with style nits, renamed chapter/section and reworded introduction.

@vojtechkral Could you review the changes? Also, you may want to look at the work plan for the formatting chapter.

@vojtechkral
Copy link
Contributor

Looks great.

I think it should be mentioned at some point that to format for {:s} one needs to implement str::Str rather than fmt::String, otherwise the reader might be surprised by a compiler error...

@japaric
Copy link
Member Author

japaric commented Jul 26, 2014

Looks great.

Ok, then I'll merge this.

I think it should be mentioned at some point that to format for {:s} one needs to implement str::Str rather than fmt::String, otherwise the reader might be surprised by a compiler error...

I think that's actually a bug that occurs when you have a generic impl (impl<T: Str> Foo for T) and you try to add a second impl that doesn't overlap (impl Foo for int).

That bug should (hopefully) get solved by the trait reform that's coming at some point. But, yes, we can drop a note about in somewhere in the chapter.

japaric pushed a commit that referenced this pull request Jul 26, 2014
Formatting chapter: Add example about Show
@japaric japaric merged commit 0b349a9 into master Jul 26, 2014
@japaric
Copy link
Member Author

japaric commented Jul 26, 2014

@vojtechkral Thanks for the initial PR and the review

@vojtechkral
Copy link
Contributor

That bug should (hopefully) get solved by the trait reform that's coming at some point. But, yes, we can drop a note about in somewhere in the chapter.

Ok, that's good to hear, in that case the note about Str is probably not needed that much...

@japaric japaric deleted the fmt branch September 26, 2014 03:03
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.

None yet

2 participants