-
Notifications
You must be signed in to change notification settings - Fork 43
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
Error type for from_env_ext
function
#54
Conversation
49867bd
to
8304b62
Compare
8304b62
to
47b2595
Compare
from_env_ext
functionfrom_env_ext
function
49426b3
to
028096e
Compare
ping @alexcrichton for merging (So far this PR has consensus between me, @NobodyXu and @belovdv.) |
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.
Sorry I haven't been following the discussion here and it seems like there's a good deal, but this to me feels like it's dialing the wrong knob per se up to 11. The FromEnv
structure feels pretty unidiomatic as it's a struct-containing-a-Result
which breaks ?
usage and requires filling out fields that may not always make the most sense. I can sort of see how it's conveying more information but I would not personally settle on this particular design.
On one hand this is fine. This isn't exactly a heavily used crate by everyone in every project so it's not like something that's a bit unidiomatic will make that much of a difference. On the other hand, though, this is not code that I would want to maintain. I would prefer to improve the idioms here and figure out a different way which I'm more comfortable with which achieves the same goal. Unfortunately I don't have a ton of time or energy to go through this process. At this point it may be best for me to hand off this crate to someone else, perhaps rust-lang
, since it's depended on by rustc
and cargo
. I at the same time don't want to block progress on feature work here.
But it's not too important anyway, this function is called ~once in a program, and if someone is calling
|
I'll reiterate the second part of my comment above. I realize that this is a minor crate which is not really all that heavily used. That being said I do not want to personally maintain the idioms introduced here, nor do I necessarily have the time or energy to walk through the review process towards something I would be willing to maintain. If updating this PR requires lots of feedback from me, or if this PR would rather not be updated, then I think it's best to look for a different maintainer of this crate to transfer ownership to. |
This PR would rather not be updated. |
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.
Looks fine with typo fixed.
Continue implementing #51. The previous PR wasn't finished and cleaned up.
If we want to discern different errors and treat them differently, more specific return type would be more convenient.
If this's going to be merged, probably there'll be some changes from current version. If it's possible, i'd like to clean up results before merging.