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

libgetopts: tweak HasHarg/Occur docs #16252

Merged
merged 1 commit into from
Aug 6, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/libgetopts/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ pub enum Name {
pub enum HasArg {
/// The option requires an argument.
Yes,
/// The option is just a flag, therefore no argument.
/// The option takes no argument.
No,
/// The option argument is optional and it could or not exist.
/// The option argument is optional.
Maybe,
}

Expand All @@ -126,9 +126,9 @@ pub enum HasArg {
pub enum Occur {
/// The option occurs once.
Req,
/// The option could or not occur.
/// The option occurs at most once.
Optional,
/// The option occurs once or multiple times.
/// The option occurs zero or more times.
Copy link
Member

Choose a reason for hiding this comment

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

Should this be one or more?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it shouldn't. That's partly why I'm making this PR. With Occur set to Multi, it is allowed for the option not to show up at all. With this PR, I'm assuming that the code is correct but the docs a little outdated.

Multi,
}

Expand Down