Skip to content

Display with self #10

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 6 commits into from
Closed

Display with self #10

wants to merge 6 commits into from

Conversation

tailhook
Copy link
Owner

Builds upon #6, and probably fixes syntax

@colin-kiegel
Copy link
Contributor

Looks good to me - You could change the README example, too. I suggest:

diff --git a/README.rst b/README.rst
index 34e0665..ee6a83c 100644
--- a/README.rst
+++ b/README.rst
@@ -32,7 +32,7 @@ Here is the comprehensive example:
             }
             IoAt(place: &'static str, err: io::Error) {
                 cause(err)
-                display("Error at {}: {}", place, err)
+                display(self_) -> ("{} {}: {}", self_.description(), place, err)
                 description("io error at")
                 from(s: String) -> ("some string",
                                     io::Error::new(io::ErrorKind::Other, s))

@colin-kiegel
Copy link
Contributor

PS: Thx. :-)

tailhook added a commit that referenced this pull request Dec 24, 2015
@tailhook tailhook closed this Dec 24, 2015
@tailhook tailhook mentioned this pull request Dec 24, 2015
@colin-kiegel
Copy link
Contributor

I think the branch display_fn could be deleted on github

@tailhook tailhook deleted the display_fn branch December 27, 2015 13:17
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.

2 participants