@@ -8,7 +8,7 @@ use std::process;
8
8
use std:: result:: Result as StdResult ;
9
9
10
10
// Internal
11
- use args:: { AnyArg , FlagBuilder } ;
11
+ use args:: AnyArg ;
12
12
use fmt:: { ColorWhen , Colorizer , ColorizerOption } ;
13
13
use suggestions;
14
14
@@ -404,14 +404,13 @@ impl Error {
404
404
pub fn write_to < W : Write > ( & self , w : & mut W ) -> io:: Result < ( ) > { write ! ( w, "{}" , self . message) }
405
405
406
406
#[ doc( hidden) ]
407
- pub fn argument_conflict < ' a , ' b , A , O , U > (
408
- arg : & A ,
407
+ pub fn argument_conflict < ' a , ' b , O , U > (
408
+ arg : & AnyArg ,
409
409
other : Option < O > ,
410
410
usage : U ,
411
411
color : ColorWhen ,
412
412
) -> Self
413
413
where
414
- A : AnyArg < ' a , ' b > + Display ,
415
414
O : Into < String > ,
416
415
U : Display ,
417
416
{
@@ -444,9 +443,8 @@ impl Error {
444
443
}
445
444
446
445
#[ doc( hidden) ]
447
- pub fn empty_value < ' a , ' b , A , U > ( arg : & A , usage : U , color : ColorWhen ) -> Self
446
+ pub fn empty_value < ' a , ' b , U > ( arg : & AnyArg , usage : U , color : ColorWhen ) -> Self
448
447
where
449
- A : AnyArg < ' a , ' b > + Display ,
450
448
U : Display ,
451
449
{
452
450
let c = Colorizer :: new ( ColorizerOption {
@@ -470,17 +468,16 @@ impl Error {
470
468
}
471
469
472
470
#[ doc( hidden) ]
473
- pub fn invalid_value < ' a , ' b , B , G , A , U > (
471
+ pub fn invalid_value < ' a , ' b , B , G , U > (
474
472
bad_val : B ,
475
473
good_vals : & [ G ] ,
476
- arg : & A ,
474
+ arg : & AnyArg ,
477
475
usage : U ,
478
476
color : ColorWhen ,
479
477
) -> Self
480
478
where
481
479
B : AsRef < str > ,
482
480
G : AsRef < str > + Display ,
483
- A : AnyArg < ' a , ' b > + Display ,
484
481
U : Display ,
485
482
{
486
483
let c = Colorizer :: new ( ColorizerOption {
@@ -660,10 +657,9 @@ impl Error {
660
657
}
661
658
662
659
#[ doc( hidden) ]
663
- pub fn too_many_values < ' a , ' b , V , A , U > ( val : V , arg : & A , usage : U , color : ColorWhen ) -> Self
660
+ pub fn too_many_values < ' a , ' b , V , U > ( val : V , arg : & AnyArg , usage : U , color : ColorWhen ) -> Self
664
661
where
665
662
V : AsRef < str > + Display + ToOwned ,
666
- A : AnyArg < ' a , ' b > + Display ,
667
663
U : Display ,
668
664
{
669
665
let v = val. as_ref ( ) ;
@@ -689,15 +685,14 @@ impl Error {
689
685
}
690
686
691
687
#[ doc( hidden) ]
692
- pub fn too_few_values < ' a , ' b , A , U > (
693
- arg : & A ,
688
+ pub fn too_few_values < ' a , ' b , U > (
689
+ arg : & AnyArg ,
694
690
min_vals : u64 ,
695
691
curr_vals : usize ,
696
692
usage : U ,
697
693
color : ColorWhen ,
698
694
) -> Self
699
695
where
700
- A : AnyArg < ' a , ' b > + Display ,
701
696
U : Display ,
702
697
{
703
698
let c = Colorizer :: new ( ColorizerOption {
@@ -724,9 +719,7 @@ impl Error {
724
719
}
725
720
726
721
#[ doc( hidden) ]
727
- pub fn value_validation < ' a , ' b , A > ( arg : Option < & A > , err : String , color : ColorWhen ) -> Self
728
- where
729
- A : AnyArg < ' a , ' b > + Display ,
722
+ pub fn value_validation < ' a , ' b > ( arg : Option < & AnyArg > , err : String , color : ColorWhen ) -> Self
730
723
{
731
724
let c = Colorizer :: new ( ColorizerOption {
732
725
use_stderr : true ,
@@ -750,21 +743,20 @@ impl Error {
750
743
751
744
#[ doc( hidden) ]
752
745
pub fn value_validation_auto ( err : String ) -> Self {
753
- let n: Option < & FlagBuilder > = None ;
746
+ let n: Option < & AnyArg > = None ;
754
747
Error :: value_validation ( n, err, ColorWhen :: Auto )
755
748
}
756
749
757
750
#[ doc( hidden) ]
758
- pub fn wrong_number_of_values < ' a , ' b , A , S , U > (
759
- arg : & A ,
751
+ pub fn wrong_number_of_values < ' a , ' b , S , U > (
752
+ arg : & AnyArg ,
760
753
num_vals : u64 ,
761
754
curr_vals : usize ,
762
755
suffix : S ,
763
756
usage : U ,
764
757
color : ColorWhen ,
765
758
) -> Self
766
759
where
767
- A : AnyArg < ' a , ' b > + Display ,
768
760
S : Display ,
769
761
U : Display ,
770
762
{
@@ -792,9 +784,8 @@ impl Error {
792
784
}
793
785
794
786
#[ doc( hidden) ]
795
- pub fn unexpected_multiple_usage < ' a , ' b , A , U > ( arg : & A , usage : U , color : ColorWhen ) -> Self
787
+ pub fn unexpected_multiple_usage < ' a , ' b , U > ( arg : & AnyArg , usage : U , color : ColorWhen ) -> Self
796
788
where
797
- A : AnyArg < ' a , ' b > + Display ,
798
789
U : Display ,
799
790
{
800
791
let c = Colorizer :: new ( ColorizerOption {
0 commit comments