File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ which = "7"
3939# * quote: 1.0.37 allows tokenizing CStr.
4040# * venial: 0.6.1 contains some bugfixes.
4141heck = " 0.5"
42- litrs = " 0.4 "
42+ litrs = { version = " 1.0 " , features = [ " proc-macro2 " ] }
4343markdown = " =1.0.0-alpha.23"
4444nanoserde = " 0.2"
4545proc-macro2 = " 1.0.80"
Original file line number Diff line number Diff line change @@ -115,9 +115,8 @@ fn extract_docs_from_attributes(doc: &[venial::Attribute]) -> impl Iterator<Item
115115 } )
116116 . flat_map ( |doc| {
117117 doc. iter ( ) . map ( |token_tree| {
118- let str = token_tree. to_string ( ) ;
119- litrs:: StringLit :: parse ( str. clone ( ) )
120- . map_or ( str, |parsed| parsed. value ( ) . to_string ( ) )
118+ litrs:: StringLit :: try_from ( token_tree)
119+ . map_or_else ( |_| token_tree. to_string ( ) , |parsed| parsed. into_value ( ) )
121120 } )
122121 } )
123122}
You can’t perform that action at this time.
0 commit comments