Make 'docs' optional
This commit is contained in:
parent
a4cbb44ae2
commit
76511a7a71
@ -27,7 +27,7 @@ impl JsonRenderer<'_> {
|
||||
name: name.map(|sym| sym.to_string()),
|
||||
source: self.convert_span(source),
|
||||
visibility: self.convert_visibility(visibility),
|
||||
docs: attrs.collapsed_doc_value().unwrap_or_default(),
|
||||
docs: attrs.collapsed_doc_value(),
|
||||
links: attrs
|
||||
.links
|
||||
.into_iter()
|
||||
|
@ -69,7 +69,7 @@ pub struct Item {
|
||||
/// so this field is needed to differentiate.
|
||||
pub visibility: Visibility,
|
||||
/// 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
|
||||
pub links: FxHashMap<String, Id>,
|
||||
/// Stringified versions of the attributes on this item (e.g. `"#[inline]"`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user