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
ListenCtlAddr type #5950
ListenCtlAddr type #5950
Conversation
Thanks for the pull request! Here is what will happen next:
Thank you for contributing! |
Looks like there are some build errors. Let me know if you need any help sorting them out, but I'll hold off on reviewing until they're resolved. |
a79729c
to
2f5242e
Compare
@baumanj yeah, I missed a couple bits. It should be cleared up now though. |
Appveyor timed out, so I restarted it. |
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.
Looking good overall, but I think there are still areas where we can tighten things up even further.
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.
I haven't finished looking at the entire PR, but since I had some fairly big suggestions for re-organizing, I wanted to get you that feedback sooner. I'll keep reviewing in the meantime, but let me know if you have any questions.
dd7a24f
to
3c31952
Compare
85e90b9
to
ba52b88
Compare
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.
A few fixes, then I think we can put this to bed.
Ok(default) | ||
}, | ||
|v| v.parse(), | ||
)?, |
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.
Actually, it'd be good to use unwrap_or_default
on these... I don't know that all the println
calls are adding much here.
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.
That was my suggestion. I'd change them to error!
since if we get there, it implies we've broken something in the clap code, but I'd rather not panic for something that's not so dire.
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.
I thought it would be nice to let the user know that the behavior might not be exactly as expected. Though technically they should never get to that point. I can drop the println
calls but I think we still need to use map_or_else
since the default value is already of the correct type but the unwrapped value would be a string.
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.
I changed them to error!
. I'm happy to remove them if preferred though.
30fa2dc
to
7e84e4f
Compare
Signed-off-by: Matthew Peck <mpeck@chef.io>
Signed-off-by: Matthew Peck <mpeck@chef.io>
Signed-off-by: Matthew Peck <mpeck@chef.io>
Obvious fix; these changes are the result of automation not creative thinking.
Creates a new type
ListenCtlAddr
in the common crate and uses it to define defaults and env var strings in the clap layer. This also moves theEnvConfig
trait to the common crate.