Skip to content
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

fix(env_tool): return None if env is empty #1021

Merged
merged 1 commit into from
Apr 7, 2024

Conversation

cathaysia
Copy link
Contributor

@cathaysia cathaysia commented Apr 1, 2024

Sometime env maybe a empty value, we should return None in this case:

image

Copy link
Collaborator

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, one nit suggestion:

src/lib.rs Outdated Show resolved Hide resolved
@cathaysia cathaysia force-pushed the bugfix/empty_ar branch 2 times, most recently from 90081c6 to c5708f8 Compare April 1, 2024 07:33
@cathaysia
Copy link
Contributor Author

Is anything blocking this?

Copy link
Collaborator

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just another suggestion:

Since you have use trim() before checking .is_empty(), I'd like the result to also be trim().

src/lib.rs Show resolved Hide resolved
@NobodyXu
Copy link
Collaborator

NobodyXu commented Apr 2, 2024

Is anything blocking this?

I was working on something else, but generally I will response within a few hours.

Your PR generally looks good to me, just have a little bit to improve on, before merging it in.

Copy link
Collaborator

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, sorry I somehow didn't get a notification from github

@NobodyXu NobodyXu merged commit d902ed3 into rust-lang:main Apr 7, 2024
21 checks passed
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