File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,6 @@ fn main() -> Result<()> {
114
114
. short ( "a" )
115
115
. long ( "ascii_language" )
116
116
. takes_value ( true )
117
- . default_value ( "rust" )
118
117
. possible_values (
119
118
& possible_languages
120
119
. iter ( )
@@ -210,9 +209,11 @@ Possible values: [{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}]",
210
209
}
211
210
212
211
let dir = String :: from ( matches. value_of ( "directory" ) . unwrap ( ) ) ;
213
- let custom_logo: Language =
214
- Language :: from_str ( & matches. value_of ( "ascii_language" ) . unwrap ( ) . to_lowercase ( ) )
215
- . unwrap_or ( Language :: Unknown ) ;
212
+ let custom_logo: Language = if let Some ( ascii_language) = matches. value_of ( "ascii_language" ) {
213
+ Language :: from_str ( & ascii_language. to_lowercase ( ) ) . unwrap ( )
214
+ } else {
215
+ Language :: Unknown
216
+ } ;
216
217
let mut disable_fields = InfoFieldOn {
217
218
..Default :: default ( )
218
219
} ;
You can’t perform that action at this time.
0 commit comments