11//! Implementation of the equality assertions.
22
33use crate :: assertions:: {
4- AssertEquality , AssertHasDebugMessage , AssertHasDisplayString , AssertSameAs ,
4+ AssertEquality , AssertHasDebugString , AssertHasDisplayString , AssertSameAs ,
55} ;
66use crate :: colored:: { mark_diff, mark_diff_str} ;
77use crate :: expectations:: {
8- has_debug_message , has_display_string, is_equal_to, is_same_as, not, HasDebugMessage ,
8+ has_debug_string , has_display_string, is_equal_to, is_same_as, not, HasDebugString ,
99 HasDisplayString , IsEqualTo , IsSameAs ,
1010} ;
1111use crate :: spec:: { DiffFormat , Expectation , Expression , FailingStrategy , Invertible , Spec } ;
@@ -95,22 +95,22 @@ where
9595
9696impl < E > Invertible for IsSameAs < E > { }
9797
98- impl < S , E , R > AssertHasDebugMessage < E > for Spec < ' _ , S , R >
98+ impl < S , E , R > AssertHasDebugString < E > for Spec < ' _ , S , R >
9999where
100100 S : Debug ,
101101 E : AsRef < str > ,
102102 R : FailingStrategy ,
103103{
104- fn has_debug_message ( self , expected : E ) -> Self {
105- self . expecting ( has_debug_message ( expected) )
104+ fn has_debug_string ( self , expected : E ) -> Self {
105+ self . expecting ( has_debug_string ( expected) )
106106 }
107107
108- fn does_not_have_debug_message ( self , expected : E ) -> Self {
109- self . expecting ( not ( has_debug_message ( expected) ) )
108+ fn does_not_have_debug_string ( self , expected : E ) -> Self {
109+ self . expecting ( not ( has_debug_string ( expected) ) )
110110 }
111111}
112112
113- impl < S , E > Expectation < S > for HasDebugMessage < E >
113+ impl < S , E > Expectation < S > for HasDebugString < E >
114114where
115115 S : Debug ,
116116 E : AsRef < str > ,
@@ -131,12 +131,12 @@ where
131131 let ( marked_actual, marked_expected) =
132132 mark_diff_str ( & format ! ( "{actual:?}" ) , expected, format) ;
133133 format ! (
134- "expected {expression} to {not}have debug message {expected:?}\n but was: {marked_actual}\n expected: {not}{marked_expected}" ,
134+ "expected {expression} to {not}have a debug string equal to {expected:?}\n but was: {marked_actual}\n expected: {not}{marked_expected}" ,
135135 )
136136 }
137137}
138138
139- impl < E > Invertible for HasDebugMessage < E > { }
139+ impl < E > Invertible for HasDebugString < E > { }
140140
141141impl < S , E , R > AssertHasDisplayString < E > for Spec < ' _ , S , R >
142142where
0 commit comments