fn long_to_short(&self) -> Opt {
        let OptGroup {
            short_name,
            long_name,
            hasarg,
            occur,
            ..
        } = (*self).clone();

        match (short_name.len(), long_name.len()) {
            (0,0) => panic!("this long-format option was given no name"),
            (0,_) => Opt {
                name: Long((long_name)),
                hasarg: hasarg,
                occur: occur,
                aliases: Vec::new()
            },
            (1,0) => Opt {
                name: Short(short_name.as_bytes()[0] as char),
                hasarg: hasarg,
                occur: occur,
                aliases: Vec::new()
            },
            (1,_) => Opt {
                name: Long((long_name)),
                hasarg: hasarg,
                occur: occur,
                aliases: vec!(
                    Opt {
                        name: Short(short_name.as_bytes()[0] as char),
                        hasarg: hasarg,
                        occur:  occur,
                        aliases: Vec::new()
                    }
                )
            },
            (_,_) => panic!("something is wrong with the long-form opt")
        }
    }
/// Translate OptGroup into Opt.
/// (Both short and long names correspond to different Opts).
Translate OptGroup into Opt.
(Both short and long names correspond to different Opts).
Translate OptGroup into Opt . ( Both short and long names correspond to different Opts ) .
fn long_to_short(&self) -> Opt {
        let OptGroup {
            short_name,
            long_name,
            hasarg,
            occur,
            ..
        } = (*self).clone();
        match (short_name.len(), long_name.len()) {
            (0,0) => panic!("this long-format option was given no name"),
            (0,_) => Opt {
                name: Long((long_name)),
                hasarg: hasarg,
                occur: occur,
                aliases: Vec::new()
            },
            (1,0) => Opt {
                name: Short(short_name.as_bytes()[0] as char),
                hasarg: hasarg,
                occur: occur,
                aliases: Vec::new()
            },
            (1,_) => Opt {
                name: Long((long_name)),
                hasarg: hasarg,
                occur: occur,
                aliases: vec!(
                    Opt {
                        name: Short(short_name.as_bytes()[0] as char),
                        hasarg: hasarg,
                        occur:  occur,
                        aliases: Vec::new()
                    }
                )
            },
            (_,_) => panic!("something is wrong with the long-form opt")
        }
    }
fn long_to_short ( & self ) -> Opt { let OptGroup { short_name , long_name , hasarg , occur , .. } = ( * self ) . clone ( ) ; match ( short_name . len ( ) , long_name . len ( ) ) { ( 0 , 0 ) => panic ! ( " " ) , ( 0 , _ ) => Opt { name : Long ( ( long_name ) ) , hasarg : hasarg , occur : occur , aliases : Vec :: new ( ) } , ( 1 , 0 ) => Opt { name : Short ( short_name . as_bytes ( ) [ 0 ] as char ) , hasarg : hasarg , occur : occur , aliases : Vec :: new ( ) } , ( 1 , _ ) => Opt { name : Long ( ( long_name ) ) , hasarg : hasarg , occur : occur , aliases : vec ! ( Opt { name Short ( short_name as_bytes ( ) [ 0 ] as char ) hasarg hasarg occur occur aliases Vec new ( ) } ) } , ( _ , _ ) => panic ! ( " " ) } }
Translate OptGroup into Opt.
Translate OptGroup into Opt .
&self
&self