File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -854,11 +854,13 @@ impl<'attr> AttrQuery<'attr> {
854
854
. filter ( move |attr| attr. path . as_ident ( ) . map_or ( false , |s| s. to_smol_str ( ) == key) )
855
855
}
856
856
857
+ /// Find string value for a specific key inside token tree
858
+ ///
859
+ /// ```ignore
860
+ /// #[doc(html_root_url = "url")]
861
+ /// ^^^^^^^^^^^^^ key
862
+ /// ```
857
863
pub fn find_string_value_in_tt ( self , key : & ' attr str ) -> Option < & SmolStr > {
858
- if !self . exists ( ) {
859
- return None ;
860
- }
861
-
862
864
self . tt_values ( ) . find_map ( |tt| {
863
865
let name = tt. token_trees . iter ( )
864
866
. skip_while ( |tt| !matches ! ( tt, tt:: TokenTree :: Leaf ( tt:: Leaf :: Ident ( tt:: Ident { text, ..} ) ) if text == key) )
Original file line number Diff line number Diff line change @@ -374,8 +374,8 @@ fn map_links<'e>(
374
374
// holds the origin link target on start event and the rewritten one on end event
375
375
let mut end_link_target: Option < CowStr > = None ;
376
376
// normally link's type is determined by the type of link tag in the end event,
377
- // however in same cases we want to change the link type.
378
- // For example, Shortcut type doesn't make sense for url links
377
+ // however in same cases we want to change the link type, for example,
378
+ // ` Shortcut` type doesn't make sense for url links
379
379
let mut end_link_type: Option < LinkType > = None ;
380
380
381
381
events. map ( move |evt| match evt {
You can’t perform that action at this time.
0 commit comments