1
Fork 0

Improve code for DocFragment rework

This commit is contained in:
Guillaume Gomez 2020-12-26 14:03:33 +01:00
parent 0ab6c90699
commit 4ba1928fa2
4 changed files with 18 additions and 19 deletions

View file

@ -314,10 +314,9 @@ impl DocFolder for Cache {
ty: item.type_(),
name: s.to_string(),
path: path.join("::"),
desc: item.doc_value().map_or_else(
|| String::new(),
|x| short_markdown_summary(&x.as_str()),
),
desc: item
.doc_value()
.map_or_else(String::new, |x| short_markdown_summary(&x.as_str())),
parent,
parent_idx: None,
search_type: get_index_search_type(&item),