-
Notifications
You must be signed in to change notification settings - Fork 107
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
Derive Debug for public structs #59
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tmccombs! I've just left a simple comment about the WalkDirOptions
Debug
implementation.
src/lib.rs
Outdated
@@ -195,6 +196,20 @@ struct WalkDirOptions { | |||
contents_first: bool, | |||
} | |||
|
|||
impl fmt::Debug for WalkDirOptions { | |||
fn fmt(&self, f: &mut fmt::Formatter) -> ::std::result::Result<(), fmt::Error> { | |||
write!(f, "WalkDirOptions {{ follow_links: {:?}, max_open: {:?}, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to manually implement Debug
for the sort_by
field?
There's a handy debug_struct
method on Formatter
that we could use here to simplify this implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this should definitely be using debug_struct
.
Hmm, it looks like we might have to do some more |
Looks like we'll bump the minimum version to |
r? @BurntSushi |
Do you think this one is good to go now @BurntSushi? |
@KodrAus Ah yup, thanks! |
Fixes #34