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