fn dup_parser(parser: &mut Parser) -> Parser {
        let args: Vec<OsString> = parser.source.by_ref().collect();
        parser.source = box_dyn(args.clone().into_iter()).peekable();
        let new = Parser {
            source: box_dyn(args.into_iter()).peekable(),
            shorts: parser.shorts.clone(),
            #[cfg(windows)]
            shorts_utf16: parser.shorts_utf16.clone(),
            long: parser.long.clone(),
            long_value: parser.long_value.clone(),
            last_option: parser.last_option,
            finished_opts: parser.finished_opts,
            bin_name: parser.bin_name.clone(),
        };
        new
    }
/// Clone a parser.
///
/// This is not a Clone impl because the original has to be modified and
/// I don't want to add interior mutability. It also runs forever if the
/// iterator is infinite, which seems impolite.
Clone a parser.
This is not a Clone impl because the original has to be modified and
I don't want to add interior mutability. It also runs forever if the
iterator is infinite, which seems impolite.
Clone a parser . This is not a Clone impl because the original has to be modified and I don ' t want to add interior mutability . It also runs forever if the iterator is infinite which seems impolite .
fn dup_parser(parser: &mut Parser) -> Parser {
        let args: Vec<OsString> = parser.source.by_ref().collect();
        parser.source = box_dyn(args.clone().into_iter()).peekable();
        let new = Parser {
            source: box_dyn(args.into_iter()).peekable(),
            shorts: parser.shorts.clone(),
            #[cfg(windows)]
            shorts_utf16: parser.shorts_utf16.clone(),
            long: parser.long.clone(),
            long_value: parser.long_value.clone(),
            last_option: parser.last_option,
            finished_opts: parser.finished_opts,
            bin_name: parser.bin_name.clone(),
        };
        new
    }
fn dup_parser ( parser : & mut Parser ) -> Parser { let args : Vec < OsString > = parser . source . by_ref ( ) . collect ( ) ; parser . source = box_dyn ( args . clone ( ) . into_iter ( ) ) . peekable ( ) ; let new = Parser { source : box_dyn ( args . into_iter ( ) ) . peekable ( ) , shorts : parser . shorts . clone ( ) , # [ cfg ( windows ) ] shorts_utf16 : parser . shorts_utf16 . clone ( ) , long : parser . long . clone ( ) , long_value : parser . long_value . clone ( ) , last_option : parser . last_option , finished_opts : parser . finished_opts , bin_name : parser . bin_name . clone ( ) , } ; new }
Clone a parser.
Clone a parser .
parser
&mut Parser