Skip to content

Update 07-repeated-field.rs #62

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

Closed
wants to merge 1 commit into from
Closed

Update 07-repeated-field.rs #62

wants to merge 1 commit into from

Conversation

gftea
Copy link

@gftea gftea commented Apr 8, 2023

env is mandatory field

`env` is mandatory field
Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

I think the code is correct as written.

@dtolnay dtolnay closed this Apr 8, 2023
@gftea
Copy link
Author

gftea commented Apr 8, 2023

@dtolnay I got error in 07 testcase because env is None. Anything I missed?

@dtolnay
Copy link
Owner

dtolnay commented Apr 8, 2023

If the user calls env n times, they need to get a vector of n environment variables. So for example they can call 2 times to get 2 elements in the vector (this is tested by assert_eq!(command.args, vec!["build", "--release"])). Or they call 0 times to get 0 elements in the vector.

@gftea
Copy link
Author

gftea commented Apr 8, 2023

If the user calls env n times, they need to get a vector of n environment variables. So for example they can call 2 times to get 2 elements in the vector (this is tested by assert_eq!(command.args, vec!["build", "--release"])). Or they call 0 times to get 0 elements in the vector.

thanks, I see your explanation
I interpret mandatory field is that user at least call 1 time, because env is not a Option field, so we should report error if no env is set by user

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