@@ -670,7 +670,7 @@ impl ToString for Hover {
670670 HoverContents :: Scalar ( ref ms) => ms. to_string ( ) ,
671671 HoverContents :: Array ( ref vec) => vec
672672 . iter ( )
673- . map ( |i| i . to_string ( ) )
673+ . map ( ToString :: to_string)
674674 . collect :: < Vec < _ > > ( )
675675 . join ( "\n " ) ,
676676 HoverContents :: Markup ( ref mc) => mc. to_string ( ) ,
@@ -709,7 +709,7 @@ impl ToDisplay for lsp::MarkedString {
709709 MarkedString :: String ( ref s) => s,
710710 MarkedString :: LanguageString ( ref ls) => & ls. value ,
711711 } ;
712- s. lines ( ) . map ( |i| i . to_string ( ) ) . collect ( )
712+ s. lines ( ) . map ( String :: from ) . collect ( )
713713 }
714714
715715 fn vim_filetype ( & self ) -> Option < String > {
@@ -744,7 +744,7 @@ impl ToDisplay for Hover {
744744 let mut buf = Vec :: new ( ) ;
745745
746746 buf. push ( format ! ( "```{}" , ls. language) ) ;
747- buf. extend ( ls. value . lines ( ) . map ( |i| i . to_string ( ) ) ) ;
747+ buf. extend ( ls. value . lines ( ) . map ( String :: from ) ) ;
748748 buf. push ( "```" . to_string ( ) ) ;
749749
750750 buf
@@ -768,7 +768,7 @@ impl ToDisplay for Hover {
768768
769769impl ToDisplay for str {
770770 fn to_display ( & self ) -> Vec < String > {
771- self . lines ( ) . map ( |s| s . to_string ( ) ) . collect ( )
771+ self . lines ( ) . map ( String :: from ) . collect ( )
772772 }
773773}
774774
@@ -795,7 +795,7 @@ impl LinesLen for Hover {
795795 fn lines_len ( & self ) -> usize {
796796 match self . contents {
797797 HoverContents :: Scalar ( ref c) => c. lines_len ( ) ,
798- HoverContents :: Array ( ref arr) => arr. iter ( ) . map ( |i| i . lines_len ( ) ) . sum ( ) ,
798+ HoverContents :: Array ( ref arr) => arr. iter ( ) . map ( LinesLen :: lines_len) . sum ( ) ,
799799 HoverContents :: Markup ( ref c) => c. lines_len ( ) ,
800800 }
801801 }
0 commit comments