@@ -26,8 +26,8 @@ pub(crate) struct MdInlinesWriter<'md> {
2626}
2727
2828struct PendingReferences < ' md > {
29- pub links : HashMap < LinkLabel < ' md > , UrlAndTitle < ' md > > ,
30- pub footnotes : HashSet < & ' md FootnoteId > ,
29+ links : HashMap < LinkLabel < ' md > , UrlAndTitle < ' md > > ,
30+ footnotes : HashSet < & ' md FootnoteId > ,
3131}
3232
3333impl PendingReferences < ' _ > {
@@ -41,9 +41,9 @@ impl PendingReferences<'_> {
4141
4242#[ derive( Serialize , Debug , PartialEq , Eq , Copy , Clone , Hash ) ]
4343pub ( crate ) struct UrlAndTitle < ' md > {
44- pub url : & ' md String ,
44+ pub ( crate ) url : & ' md String ,
4545 #[ serde( skip_serializing_if = "Option::is_none" ) ]
46- pub title : & ' md Option < String > ,
46+ pub ( crate ) title : & ' md Option < String > ,
4747}
4848
4949#[ derive( Debug , Copy , Clone ) ]
@@ -73,7 +73,7 @@ impl<'md> LinkLike<'md> for &'md Image {
7373}
7474
7575impl < ' md > MdInlinesWriter < ' md > {
76- pub fn new ( ctx : & ' md MdContext , options : InlineElemOptions ) -> Self {
76+ pub ( crate ) fn new ( ctx : & ' md MdContext , options : InlineElemOptions ) -> Self {
7777 let pending_refs_capacity = 8 ; // arbitrary guess
7878 Self {
7979 ctx,
@@ -85,27 +85,27 @@ impl<'md> MdInlinesWriter<'md> {
8585 }
8686 }
8787
88- pub fn has_pending_links ( & self ) -> bool {
88+ pub ( crate ) fn has_pending_links ( & self ) -> bool {
8989 !self . pending_references . links . is_empty ( )
9090 }
9191
92- pub fn has_pending_footnotes ( & self ) -> bool {
92+ pub ( crate ) fn has_pending_footnotes ( & self ) -> bool {
9393 !self . pending_references . footnotes . is_empty ( )
9494 }
9595
96- pub fn count_pending_links ( & self ) -> usize {
96+ pub ( crate ) fn count_pending_links ( & self ) -> usize {
9797 self . pending_references . links . len ( )
9898 }
9999
100- pub fn count_pending_footnotes ( & self ) -> usize {
100+ pub ( crate ) fn count_pending_footnotes ( & self ) -> usize {
101101 self . pending_references . footnotes . len ( )
102102 }
103103
104- pub fn drain_pending_links ( & mut self ) -> Vec < ( LinkLabel < ' md > , UrlAndTitle < ' md > ) > {
104+ pub ( crate ) fn drain_pending_links ( & mut self ) -> Vec < ( LinkLabel < ' md > , UrlAndTitle < ' md > ) > {
105105 self . pending_references . links . drain ( ) . collect ( )
106106 }
107107
108- pub fn drain_pending_footnotes ( & mut self ) -> Vec < ( String , & ' md Vec < MdElem > ) > {
108+ pub ( crate ) fn drain_pending_footnotes ( & mut self ) -> Vec < ( String , & ' md Vec < MdElem > ) > {
109109 let mut result = Vec :: with_capacity ( self . pending_references . footnotes . len ( ) ) ;
110110 let mut to_stringer = self . footnote_transformer . new_to_stringer ( ) ;
111111
@@ -118,7 +118,7 @@ impl<'md> MdInlinesWriter<'md> {
118118 result
119119 }
120120
121- pub fn write_line < I , W > ( & mut self , out : & mut Output < W > , elems : I )
121+ pub ( crate ) fn write_line < I , W > ( & mut self , out : & mut Output < W > , elems : I )
122122 where
123123 I : IntoIterator < Item = & ' md Inline > ,
124124 W : SimpleWrite ,
@@ -128,7 +128,7 @@ impl<'md> MdInlinesWriter<'md> {
128128 }
129129 }
130130
131- pub fn write_inline_element < W > ( & mut self , out : & mut Output < W > , elem : & ' md Inline )
131+ pub ( crate ) fn write_inline_element < W > ( & mut self , out : & mut Output < W > , elem : & ' md Inline )
132132 where
133133 W : SimpleWrite ,
134134 {
@@ -269,7 +269,7 @@ impl<'md> MdInlinesWriter<'md> {
269269 ///
270270 /// The `contents` function is what writes e.g. `an inline link` above. It's a function because it may be a recursive
271271 /// call into [write_line] (for links) or just simple text (for image alts).
272- pub fn write_linklike < W , L > ( & mut self , out : & mut Output < W > , link_like : L )
272+ pub ( crate ) fn write_linklike < W , L > ( & mut self , out : & mut Output < W > , link_like : L )
273273 where
274274 W : SimpleWrite ,
275275 L : LinkLike < ' md > + Copy ,
@@ -372,7 +372,7 @@ impl<'md> MdInlinesWriter<'md> {
372372 } ) ;
373373 }
374374
375- pub fn write_url_title < W > ( & mut self , out : & mut Output < W > , title : & Option < String > )
375+ pub ( crate ) fn write_url_title < W > ( & mut self , out : & mut Output < W > , title : & Option < String > )
376376 where
377377 W : SimpleWrite ,
378378 {
@@ -415,7 +415,7 @@ enum TitleQuote {
415415}
416416
417417impl TitleQuote {
418- pub fn find_best_strategy ( text : & str ) -> Self {
418+ pub ( crate ) fn find_best_strategy ( text : & str ) -> Self {
419419 [ Self :: Double , Self :: Single , Self :: Paren ]
420420 . into_iter ( )
421421 . find ( |strategy| !strategy. has_conflicts ( text) )
0 commit comments