This repository was archived by the owner on Aug 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +12
-7
lines changed
Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ impl Combiner {
121121 . rel_manifest_dir ( self . rel_manifest_dir )
122122 . success_message ( self . success_message )
123123 . legacy_manifest_dirs ( self . legacy_manifest_dirs )
124- . output_script ( path_to_str ( & output_script) ?) ;
124+ . output_script ( path_to_str ( & output_script) ?. into ( ) ) ;
125125 scripter. run ( ) ?;
126126
127127 // Make the tarballs.
@@ -131,7 +131,7 @@ impl Combiner {
131131 tarballer
132132 . work_dir ( self . work_dir )
133133 . input ( self . package_name )
134- . output ( path_to_str ( & output) ?) ;
134+ . output ( path_to_str ( & output) ?. into ( ) ) ;
135135 tarballer. run ( ) ?;
136136
137137 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ impl Generator {
8585 . rel_manifest_dir ( self . rel_manifest_dir )
8686 . success_message ( self . success_message )
8787 . legacy_manifest_dirs ( self . legacy_manifest_dirs )
88- . output_script ( path_to_str ( & output_script) ?) ;
88+ . output_script ( path_to_str ( & output_script) ?. into ( ) ) ;
8989 scripter. run ( ) ?;
9090
9191 // Make the tarballs
@@ -95,7 +95,7 @@ impl Generator {
9595 tarballer
9696 . work_dir ( self . work_dir )
9797 . input ( self . package_name )
98- . output ( path_to_str ( & output) ?) ;
98+ . output ( path_to_str ( & output) ?. into ( ) ) ;
9999 tarballer. run ( ) ?;
100100
101101 Ok ( ( ) )
Original file line number Diff line number Diff line change 11use anyhow:: { Context , Result } ;
22use clap:: { App , ArgMatches } ;
3+ use std:: convert:: TryInto ;
34
45fn main ( ) -> Result < ( ) > {
56 let yaml = clap:: load_yaml!( "main.yml" ) ;
@@ -19,7 +20,11 @@ macro_rules! parse(
1920 ( $matches: expr => $type: ty { $( $option: tt => $setter: ident, ) * } ) => {
2021 {
2122 let mut command: $type = Default :: default ( ) ;
22- $( $matches. value_of( $option) . map( |s| command. $setter( s) ) ; ) *
23+ $(
24+ if let Some ( val) = $matches. value_of( $option) {
25+ command. $setter( val. try_into( ) ?) ;
26+ }
27+ ) *
2328 command
2429 }
2530 }
Original file line number Diff line number Diff line change @@ -142,8 +142,8 @@ macro_rules! actor {
142142
143143 impl $name {
144144 $( $( #[ $field_attr ] ) +
145- pub fn $field< T : Into <$type>> ( & mut self , value: T ) -> & mut Self {
146- self . $field = value. into ( ) ;
145+ pub fn $field( & mut self , value: $type ) -> & mut Self {
146+ self . $field = value;
147147 self
148148 } ) +
149149 }
You can’t perform that action at this time.
0 commit comments