13
13
//! let s = "My *markdown* _text_";
14
14
//! let mut id_map = IdMap::new();
15
15
//! let md = Markdown(s, &[], &mut id_map, ErrorCodes::Yes, Edition::Edition2015, &None);
16
- //! let html = md.to_string ();
16
+ //! let html = md.into_string ();
17
17
//! // ... something using html
18
18
//! ```
19
19
@@ -848,7 +848,7 @@ impl LangString {
848
848
}
849
849
850
850
impl Markdown < ' _ > {
851
- pub fn to_string ( self ) -> String {
851
+ pub fn into_string ( self ) -> String {
852
852
let Markdown ( md, links, mut ids, codes, edition, playground) = self ;
853
853
854
854
// This is actually common enough to special-case
@@ -878,7 +878,7 @@ impl Markdown<'_> {
878
878
}
879
879
880
880
impl MarkdownWithToc < ' _ > {
881
- pub fn to_string ( self ) -> String {
881
+ pub fn into_string ( self ) -> String {
882
882
let MarkdownWithToc ( md, mut ids, codes, edition, playground) = self ;
883
883
884
884
let p = Parser :: new_ext ( md, opts ( ) ) ;
@@ -899,7 +899,7 @@ impl MarkdownWithToc<'_> {
899
899
}
900
900
901
901
impl MarkdownHtml < ' _ > {
902
- pub fn to_string ( self ) -> String {
902
+ pub fn into_string ( self ) -> String {
903
903
let MarkdownHtml ( md, mut ids, codes, edition, playground) = self ;
904
904
905
905
// This is actually common enough to special-case
@@ -926,7 +926,7 @@ impl MarkdownHtml<'_> {
926
926
}
927
927
928
928
impl MarkdownSummaryLine < ' _ > {
929
- pub fn to_string ( self ) -> String {
929
+ pub fn into_string ( self ) -> String {
930
930
let MarkdownSummaryLine ( md, links) = self ;
931
931
// This is actually common enough to special-case
932
932
if md. is_empty ( ) {
0 commit comments