//! 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
//! ```
(Some(h), _) => h,
(None, Some(item_did)) => {
match item_did.as_local() {
- Some(item_did) => self.tcx.hir().as_local_hir_id(item_did),
+ Some(item_did) => self.tcx.hir().local_def_id_to_hir_id(item_did),
None => {
// If non-local, no need to check anything.
return;
}
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
}
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());
}
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
}
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() {