Skip to content

Commit 5e961a9

Browse files
committed
Implements Debug, PartialEq and Clone for OptGroup, ParsingStyle
1 parent f2ecc31 commit 5e961a9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ use unicode_width::UnicodeWidthStr;
124124
mod tests;
125125

126126
/// A description of the options that a program can handle.
127+
#[derive(PartialEq, Debug, Clone)]
127128
pub struct Options {
128129
grps: Vec<OptGroup>,
129130
parsing_style: ParsingStyle,
@@ -604,7 +605,7 @@ fn validate_names(short_name: &str, long_name: &str) {
604605
}
605606

606607
/// What parsing style to use when parsing arguments.
607-
#[derive(Clone, Copy, PartialEq, Eq)]
608+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
608609
pub enum ParsingStyle {
609610
/// Flags and "free" arguments can be freely inter-mixed.
610611
FloatingFrees,
@@ -661,7 +662,7 @@ struct Opt {
661662

662663
/// One group of options, e.g., both `-h` and `--help`, along with
663664
/// their shared description and properties.
664-
#[derive(Clone, PartialEq, Eq)]
665+
#[derive(Debug, Clone, PartialEq, Eq)]
665666
struct OptGroup {
666667
/// Short name of the option, e.g. `h` for a `-h` option
667668
short_name: String,

0 commit comments

Comments
 (0)