@@ -3,7 +3,7 @@ use std::fmt::Display;
33use std:: io;
44use std:: io:: { BufRead , Write } ;
55
6- use clap:: { App , Arg , SubCommand } ;
6+ use clap:: { App , Arg } ;
77
88use hdrhistogram:: serialization:: {
99 DeserializeError , Deserializer , Serializer , V2DeflateSerializeError , V2DeflateSerializer ,
@@ -15,58 +15,58 @@ fn main() {
1515 let default_max = format ! ( "{}" , u64 :: max_value( ) ) ;
1616 let matches = App :: new ( "hdrhistogram cli" )
1717 . subcommand (
18- SubCommand :: with_name ( "serialize" )
18+ App :: new ( "serialize" )
1919 . about (
2020 "Transform number-per-line input from stdin \
2121 into a serialized histogram on stdout",
2222 )
2323 . arg (
24- Arg :: with_name ( "min" )
24+ Arg :: new ( "min" )
2525 . long ( "min" )
2626 . help ( "Minimum discernible value" )
2727 . takes_value ( true )
2828 . default_value ( "1" ) ,
2929 )
3030 . arg (
31- Arg :: with_name ( "max" )
31+ Arg :: new ( "max" )
3232 . long ( "max" )
3333 . help ( "Maximum trackable value" )
3434 . takes_value ( true )
3535 . default_value ( default_max. as_str ( ) ) ,
3636 )
3737 . arg (
38- Arg :: with_name ( "sigfig" )
38+ Arg :: new ( "sigfig" )
3939 . long ( "sigfig" )
4040 . help ( "Number of significant digits" )
4141 . takes_value ( true )
4242 . default_value ( "3" ) ,
4343 )
4444 . arg (
45- Arg :: with_name ( "compression" )
46- . short ( "c" )
45+ Arg :: new ( "compression" )
46+ . short ( 'c' )
4747 . long ( "compression" )
4848 . help ( "Enable compression" ) ,
4949 )
5050 . arg (
51- Arg :: with_name ( "resize" )
52- . short ( "r" )
51+ Arg :: new ( "resize" )
52+ . short ( 'r' )
5353 . long ( "resize" )
5454 . help ( "Enable auto resize" ) ,
5555 ) ,
5656 )
5757 . subcommand (
58- SubCommand :: with_name ( "iter-quantiles" )
58+ App :: new ( "iter-quantiles" )
5959 . about ( "Display quantiles to stdout from serialized histogram stdin" )
6060 . arg (
61- Arg :: with_name ( "ticks" )
62- . short ( "t" )
61+ Arg :: new ( "ticks" )
62+ . short ( 't' )
6363 . long ( "ticks-per-half" )
6464 . takes_value ( true )
6565 . required ( true )
6666 . help ( "Ticks per half distance" ) ,
6767 )
6868 . arg (
69- Arg :: with_name ( "quantile-precision" )
69+ Arg :: new ( "quantile-precision" )
7070 . long ( "quantile-precision" )
7171 . takes_value ( true )
7272 . default_value ( "20" ) ,
0 commit comments