File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,13 @@ fn command() -> clap::Command {
4949fn get_opts ( ) -> Opts {
5050 let opts = command ( ) . get_matches ( ) ;
5151
52- if let Some ( val) = opts. get_one :: < & str > ( "setup-device" ) {
53- Opts :: SetupDevice ( val. to_string ( ) )
54- } else if let Some ( val) = opts. get_one :: < & str > ( "reset-device" ) {
55- Opts :: ResetDevice ( val. to_string ( ) )
52+ if let Some ( val) = opts. get_one :: < String > ( "setup-device" ) {
53+ Opts :: SetupDevice ( val. clone ( ) )
54+ } else if let Some ( val) = opts. get_one :: < String > ( "reset-device" ) {
55+ Opts :: ResetDevice ( val. clone ( ) )
5656 } else {
57- let val = opts. get_one :: < & str > ( "dir" ) . expect ( "clap invariant" ) ;
58- Opts :: GenerateUnits ( val. to_string ( ) )
57+ let val = opts. get_one :: < String > ( "dir" ) . expect ( "clap invariant" ) ;
58+ Opts :: GenerateUnits ( val. clone ( ) )
5959 }
6060}
6161
You can’t perform that action at this time.
0 commit comments