@@ -11,8 +11,8 @@ use predicates::str::PredicateStrExt;
11
11
use predicates_core;
12
12
use predicates_tree:: CaseTreeExt ;
13
13
14
- use cmd:: dump_buffer;
15
- use cmd:: output_fmt;
14
+ use crate :: cmd:: dump_buffer;
15
+ use crate :: cmd:: output_fmt;
16
16
17
17
/// Assert the state of an [`Output`].
18
18
///
@@ -84,7 +84,7 @@ impl<'c> OutputAssertExt for &'c mut process::Command {
84
84
/// [`OutputAssertExt`]: trait.OutputAssertExt.html
85
85
pub struct Assert {
86
86
output : process:: Output ,
87
- context : Vec < ( & ' static str , Box < fmt:: Display > ) > ,
87
+ context : Vec < ( & ' static str , Box < dyn fmt:: Display > ) > ,
88
88
}
89
89
90
90
impl Assert {
@@ -252,7 +252,7 @@ impl Assert {
252
252
self . code_impl ( & pred. into_code ( ) )
253
253
}
254
254
255
- fn code_impl ( self , pred : & predicates_core:: Predicate < i32 > ) -> Self {
255
+ fn code_impl ( self , pred : & dyn predicates_core:: Predicate < i32 > ) -> Self {
256
256
let actual_code = self
257
257
. output
258
258
. status
@@ -346,7 +346,7 @@ impl Assert {
346
346
self . stdout_impl ( & pred. into_output ( ) )
347
347
}
348
348
349
- fn stdout_impl ( self , pred : & predicates_core:: Predicate < [ u8 ] > ) -> Self {
349
+ fn stdout_impl ( self , pred : & dyn predicates_core:: Predicate < [ u8 ] > ) -> Self {
350
350
{
351
351
let actual = & self . output . stdout ;
352
352
if let Some ( case) = pred. find_case ( false , & actual) {
@@ -438,7 +438,7 @@ impl Assert {
438
438
self . stderr_impl ( & pred. into_output ( ) )
439
439
}
440
440
441
- fn stderr_impl ( self , pred : & predicates_core:: Predicate < [ u8 ] > ) -> Self {
441
+ fn stderr_impl ( self , pred : & dyn predicates_core:: Predicate < [ u8 ] > ) -> Self {
442
442
{
443
443
let actual = & self . output . stderr ;
444
444
if let Some ( case) = pred. find_case ( false , & actual) {
@@ -450,7 +450,7 @@ impl Assert {
450
450
}
451
451
452
452
impl fmt:: Display for Assert {
453
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
453
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
454
454
for & ( ref name, ref context) in & self . context {
455
455
writeln ! ( f, "{}=`{}`" , name, context) ?;
456
456
}
@@ -459,7 +459,7 @@ impl fmt::Display for Assert {
459
459
}
460
460
461
461
impl fmt:: Debug for Assert {
462
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
462
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
463
463
f. debug_struct ( "Assert" )
464
464
. field ( "output" , & self . output )
465
465
. finish ( )
@@ -550,12 +550,12 @@ impl EqCodePredicate {
550
550
impl predicates_core:: reflection:: PredicateReflection for EqCodePredicate {
551
551
fn parameters < ' a > (
552
552
& ' a self ,
553
- ) -> Box < Iterator < Item = predicates_core:: reflection:: Parameter < ' a > > + ' a > {
553
+ ) -> Box < dyn Iterator < Item = predicates_core:: reflection:: Parameter < ' a > > + ' a > {
554
554
self . 0 . parameters ( )
555
555
}
556
556
557
557
/// Nested `Predicate`s of the current `Predicate`.
558
- fn children < ' a > ( & ' a self ) -> Box < Iterator < Item = predicates_core:: reflection:: Child < ' a > > + ' a > {
558
+ fn children < ' a > ( & ' a self ) -> Box < dyn Iterator < Item = predicates_core:: reflection:: Child < ' a > > + ' a > {
559
559
self . 0 . children ( )
560
560
}
561
561
}
@@ -575,7 +575,7 @@ impl predicates_core::Predicate<i32> for EqCodePredicate {
575
575
}
576
576
577
577
impl fmt:: Display for EqCodePredicate {
578
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
578
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
579
579
self . 0 . fmt ( f)
580
580
}
581
581
}
@@ -620,12 +620,12 @@ impl InCodePredicate {
620
620
impl predicates_core:: reflection:: PredicateReflection for InCodePredicate {
621
621
fn parameters < ' a > (
622
622
& ' a self ,
623
- ) -> Box < Iterator < Item = predicates_core:: reflection:: Parameter < ' a > > + ' a > {
623
+ ) -> Box < dyn Iterator < Item = predicates_core:: reflection:: Parameter < ' a > > + ' a > {
624
624
self . 0 . parameters ( )
625
625
}
626
626
627
627
/// Nested `Predicate`s of the current `Predicate`.
628
- fn children < ' a > ( & ' a self ) -> Box < Iterator < Item = predicates_core:: reflection:: Child < ' a > > + ' a > {
628
+ fn children < ' a > ( & ' a self ) -> Box < dyn Iterator < Item = predicates_core:: reflection:: Child < ' a > > + ' a > {
629
629
self . 0 . children ( )
630
630
}
631
631
}
@@ -645,7 +645,7 @@ impl predicates_core::Predicate<i32> for InCodePredicate {
645
645
}
646
646
647
647
impl fmt:: Display for InCodePredicate {
648
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
648
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
649
649
self . 0 . fmt ( f)
650
650
}
651
651
}
@@ -754,12 +754,12 @@ impl BytesContentOutputPredicate {
754
754
impl predicates_core:: reflection:: PredicateReflection for BytesContentOutputPredicate {
755
755
fn parameters < ' a > (
756
756
& ' a self ,
757
- ) -> Box < Iterator < Item = predicates_core:: reflection:: Parameter < ' a > > + ' a > {
757
+ ) -> Box < dyn Iterator < Item = predicates_core:: reflection:: Parameter < ' a > > + ' a > {
758
758
self . 0 . parameters ( )
759
759
}
760
760
761
761
/// Nested `Predicate`s of the current `Predicate`.
762
- fn children < ' a > ( & ' a self ) -> Box < Iterator < Item = predicates_core:: reflection:: Child < ' a > > + ' a > {
762
+ fn children < ' a > ( & ' a self ) -> Box < dyn Iterator < Item = predicates_core:: reflection:: Child < ' a > > + ' a > {
763
763
self . 0 . children ( )
764
764
}
765
765
}
@@ -779,7 +779,7 @@ impl predicates_core::Predicate<[u8]> for BytesContentOutputPredicate {
779
779
}
780
780
781
781
impl fmt:: Display for BytesContentOutputPredicate {
782
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
782
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
783
783
self . 0 . fmt ( f)
784
784
}
785
785
}
@@ -833,12 +833,12 @@ impl StrContentOutputPredicate {
833
833
impl predicates_core:: reflection:: PredicateReflection for StrContentOutputPredicate {
834
834
fn parameters < ' a > (
835
835
& ' a self ,
836
- ) -> Box < Iterator < Item = predicates_core:: reflection:: Parameter < ' a > > + ' a > {
836
+ ) -> Box < dyn Iterator < Item = predicates_core:: reflection:: Parameter < ' a > > + ' a > {
837
837
self . 0 . parameters ( )
838
838
}
839
839
840
840
/// Nested `Predicate`s of the current `Predicate`.
841
- fn children < ' a > ( & ' a self ) -> Box < Iterator < Item = predicates_core:: reflection:: Child < ' a > > + ' a > {
841
+ fn children < ' a > ( & ' a self ) -> Box < dyn Iterator < Item = predicates_core:: reflection:: Child < ' a > > + ' a > {
842
842
self . 0 . children ( )
843
843
}
844
844
}
@@ -858,7 +858,7 @@ impl predicates_core::Predicate<[u8]> for StrContentOutputPredicate {
858
858
}
859
859
860
860
impl fmt:: Display for StrContentOutputPredicate {
861
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
861
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
862
862
self . 0 . fmt ( f)
863
863
}
864
864
}
@@ -924,12 +924,12 @@ where
924
924
{
925
925
fn parameters < ' a > (
926
926
& ' a self ,
927
- ) -> Box < Iterator < Item = predicates_core:: reflection:: Parameter < ' a > > + ' a > {
927
+ ) -> Box < dyn Iterator < Item = predicates_core:: reflection:: Parameter < ' a > > + ' a > {
928
928
self . 0 . parameters ( )
929
929
}
930
930
931
931
/// Nested `Predicate`s of the current `Predicate`.
932
- fn children < ' a > ( & ' a self ) -> Box < Iterator < Item = predicates_core:: reflection:: Child < ' a > > + ' a > {
932
+ fn children < ' a > ( & ' a self ) -> Box < dyn Iterator < Item = predicates_core:: reflection:: Child < ' a > > + ' a > {
933
933
self . 0 . children ( )
934
934
}
935
935
}
@@ -955,7 +955,7 @@ impl<P> fmt::Display for StrOutputPredicate<P>
955
955
where
956
956
P : predicates_core:: Predicate < str > ,
957
957
{
958
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
958
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
959
959
self . 0 . fmt ( f)
960
960
}
961
961
}
0 commit comments