Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement `Debug` for public types #442
Conversation
This comment has been minimized.
This comment has been minimized.
|
@tmccombs hmm -- I'm seeing a bunch of travis failures! do you mind taking a look? |
This comment has been minimized.
This comment has been minimized.
KodrAus
commented
Sep 18, 2017
•
|
|
This comment has been minimized.
This comment has been minimized.
|
Ah I didn't run with rayon_unstable feature turned on locally. I'll look into them. |
tmccombs
force-pushed the
tmccombs:debug-impl
branch
from
6dede2b
to
57d7725
Sep 19, 2017
This comment has been minimized.
This comment has been minimized.
|
hmm, I had a typo, so it didn't actually get everything, I'll work on getting all the structs I missed. |
tmccombs
added some commits
Sep 19, 2017
KodrAus
reviewed
Sep 21, 2017
| @@ -113,6 +115,11 @@ impl<T, E> Drop for RayonFuture<T, E> { | |||
| } | |||
| } | |||
|
|
|||
| impl<T, E> fmt::Debug for RayonFuture<T, E> { | |||
| fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { | |||
| fmt.write_str("RayonFuture(...)") | |||
This comment has been minimized.
This comment has been minimized.
KodrAus
approved these changes
Sep 21, 2017
KodrAus left a comment
|
I'm happy with this, so I'll hand over to @nikomatsakis or @cuviper who might want to tweak the fields included for some of the |
cuviper
reviewed
Sep 22, 2017
| fmt.debug_struct("Scope") | ||
| .field("owner_thread", &self.owner_thread) | ||
| .field("panic", &self.panic) | ||
| .field("job_completed", &self.job_completed_latch.probe()) |
This comment has been minimized.
This comment has been minimized.
cuviper
Sep 22, 2017
Member
I think probe() will always be true until the scope is out of the user's hands. For debugging purposes, the actual counter value would be more interesting. How about adding Debug to CountLatch and show that here?
This comment has been minimized.
This comment has been minimized.
tmccombs
and others
added some commits
Sep 22, 2017
This comment has been minimized.
This comment has been minimized.
|
I added a couple more that hit master in the meantime. Thanks! |
tmccombs commentedSep 18, 2017
Fixes #427.
I included what I though was important in the implementations, but I'm open to suggestions.