diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-07-16 11:18:53 -0700 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-16 11:18:53 -0700 | 
| commit | 61fccf05f90b1a99a62ccd811152c4eeec57fba3 (patch) | |
| tree | 13e0f61305395b349ce36a10c530f29995b74305 /src/librustdoc/html/markdown.rs | |
| parent | 196243ed9bf37e907c0a9904fd7f48e8af8c358a (diff) | |
| parent | 0f4e4a022c0aab65e40a4b60ea7984075891826d (diff) | |
| download | rust-61fccf05f90b1a99a62ccd811152c4eeec57fba3.tar.gz rust-61fccf05f90b1a99a62ccd811152c4eeec57fba3.zip | |
Rollup merge of #74359 - lzutao:rustdoc-tostring, r=GuillaumeGomez
rustdoc: Rename internal API fns to `into_string` to avoid surprising listed in API guidelines.
Diffstat (limited to 'src/librustdoc/html/markdown.rs')
| -rw-r--r-- | src/librustdoc/html/markdown.rs | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index d09fe454e13..4cfd81ffbce 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -13,7 +13,7 @@ //! let s = "My *markdown* _text_"; //! let mut id_map = IdMap::new(); //! let md = Markdown(s, &[], &mut id_map, ErrorCodes::Yes, Edition::Edition2015, &None); -//! let html = md.to_string(); +//! let html = md.into_string(); //! // ... something using html //! ``` @@ -848,7 +848,7 @@ impl LangString { } impl Markdown<'_> { - pub fn to_string(self) -> String { + pub fn into_string(self) -> String { let Markdown(md, links, mut ids, codes, edition, playground) = self; // This is actually common enough to special-case @@ -878,7 +878,7 @@ impl Markdown<'_> { } impl MarkdownWithToc<'_> { - pub fn to_string(self) -> String { + pub fn into_string(self) -> String { let MarkdownWithToc(md, mut ids, codes, edition, playground) = self; let p = Parser::new_ext(md, opts()); @@ -899,7 +899,7 @@ impl MarkdownWithToc<'_> { } impl MarkdownHtml<'_> { - pub fn to_string(self) -> String { + pub fn into_string(self) -> String { let MarkdownHtml(md, mut ids, codes, edition, playground) = self; // This is actually common enough to special-case @@ -926,7 +926,7 @@ impl MarkdownHtml<'_> { } impl MarkdownSummaryLine<'_> { - pub fn to_string(self) -> String { + pub fn into_string(self) -> String { let MarkdownSummaryLine(md, links) = self; // This is actually common enough to special-case if md.is_empty() { | 
