Change docs and description to getter method

This commit is contained in:
Edwin Cheng 2019-06-10 00:03:38 +08:00
parent aacc894134
commit e9848b2e6c
2 changed files with 11 additions and 4 deletions

View file

@ -76,7 +76,7 @@ where
// FIXME: this should not really use navigation target. Rather, approximately
// resolved symbol should return a `DefId`.
pub(crate) fn doc_text_for(nav: NavigationTarget) -> Option<String> {
match (nav.description, nav.docs) {
match (nav.description(), nav.docs()) {
(Some(desc), docs) => Some(rust_code_markup_with_doc(desc, docs)),
(None, Some(docs)) => Some(docs),
_ => None,