File tree 1 file changed +0
-22
lines changed 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -270,28 +270,6 @@ pub fn setup_line_renderer_range(
270
270
)
271
271
}
272
272
273
- #[ cfg( all( feature = "lean-cli" , not( feature = "pretty-cli" ) ) ) ]
274
- pub fn from_env < T : argh:: TopLevelCommand > ( ) -> T {
275
- static VERSION : & str = concat ! ( env!( "CARGO_PKG_NAME" ) , " " , env!( "CARGO_PKG_VERSION" ) ) ;
276
- let strings: Vec < String > = std:: env:: args ( ) . collect ( ) ;
277
- let strs: Vec < & str > = strings. iter ( ) . map ( |s| s. as_str ( ) ) . collect ( ) ;
278
- T :: from_args ( & [ strs[ 0 ] ] , & strs[ 1 ..] ) . unwrap_or_else ( |early_exit| {
279
- // This allows us to make subcommands mandatory,
280
- // and trigger a helpful message unless --version is specified
281
- if let Some ( arg) = std:: env:: args ( ) . nth ( 1 ) {
282
- if arg == "--version" {
283
- println ! ( "{}" , VERSION ) ;
284
- std:: process:: exit ( 0 ) ;
285
- }
286
- }
287
- println ! ( "{}" , early_exit. output) ;
288
- std:: process:: exit ( match early_exit. status {
289
- Ok ( ( ) ) => 0 ,
290
- Err ( ( ) ) => 1 ,
291
- } )
292
- } )
293
- }
294
-
295
273
mod clap {
296
274
use std:: { ffi:: OsStr , str:: FromStr } ;
297
275
You can’t perform that action at this time.
0 commit comments