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 6666 InnerMatcherT : for < ' a > Matcher < & ' a str > ,
6767{
6868 fn matches ( & self , actual : ActualT ) -> MatcherResult {
69- String :: from_utf8 ( actual. as_ref ( ) . to_vec ( ) )
70- . map ( |s| self . inner . matches ( & s) )
69+ std :: str :: from_utf8 ( actual. as_ref ( ) )
70+ . map ( |s| self . inner . matches ( s) )
7171 . unwrap_or ( MatcherResult :: NoMatch )
7272 }
7373
8787 }
8888
8989 fn explain_match ( & self , actual : ActualT ) -> Description {
90- match String :: from_utf8 ( actual. as_ref ( ) . to_vec ( ) ) {
90+ match std :: str :: from_utf8 ( actual. as_ref ( ) ) {
9191 Ok ( s) => {
92- format ! ( "which is a UTF-8 encoded string {}" , self . inner. explain_match( & s) ) . into ( )
92+ format ! ( "which is a UTF-8 encoded string {}" , self . inner. explain_match( s) ) . into ( )
9393 }
9494 Err ( e) => format ! ( "which is not a UTF-8 encoded string: {e}" ) . into ( ) ,
9595 }
You can’t perform that action at this time.
0 commit comments