Make 'docs' optional
This commit is contained in:
parent
a4cbb44ae2
commit
76511a7a71
2 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ impl JsonRenderer<'_> {
|
||||||
name: name.map(|sym| sym.to_string()),
|
name: name.map(|sym| sym.to_string()),
|
||||||
source: self.convert_span(source),
|
source: self.convert_span(source),
|
||||||
visibility: self.convert_visibility(visibility),
|
visibility: self.convert_visibility(visibility),
|
||||||
docs: attrs.collapsed_doc_value().unwrap_or_default(),
|
docs: attrs.collapsed_doc_value(),
|
||||||
links: attrs
|
links: attrs
|
||||||
.links
|
.links
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|
|
@ -69,7 +69,7 @@ pub struct Item {
|
||||||
/// so this field is needed to differentiate.
|
/// so this field is needed to differentiate.
|
||||||
pub visibility: Visibility,
|
pub visibility: Visibility,
|
||||||
/// The full markdown docstring of this item.
|
/// The full markdown docstring of this item.
|
||||||
pub docs: String,
|
pub docs: Option<String>,
|
||||||
/// This mapping resolves [intra-doc links](https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md) from the docstring to their IDs
|
/// This mapping resolves [intra-doc links](https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md) from the docstring to their IDs
|
||||||
pub links: FxHashMap<String, Id>,
|
pub links: FxHashMap<String, Id>,
|
||||||
/// Stringified versions of the attributes on this item (e.g. `"#[inline]"`)
|
/// Stringified versions of the attributes on this item (e.g. `"#[inline]"`)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue