File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ mod test_readme {
1010 mod something { }
1111}
1212
13+ use std:: fmt:: Display ;
1314use delegate:: delegate;
1415
1516#[ cfg( feature = "serde" ) ]
@@ -147,9 +148,9 @@ impl TryFrom<String> for NonEmptyString {
147148 }
148149}
149150
150- impl std :: fmt :: Display for NonEmptyString {
151+ impl Display for NonEmptyString {
151152 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
152- write ! ( f , "{}" , self . 0 )
153+ Display :: fmt ( & self . 0 , f )
153154 }
154155}
155156
@@ -202,7 +203,6 @@ mod tests {
202203 fn format_test ( ) {
203204 let str = NonEmptyString :: new ( "string" . to_owned ( ) ) . unwrap ( ) ;
204205 println ! ( "{}" , & str ) ;
205-
206- let _str: String = str. to_string ( ) ;
206+ assert_eq ! ( String :: from( "string" ) , str . to_string( ) )
207207 }
208208}
You can’t perform that action at this time.
0 commit comments