Skip to content

Commit

Permalink
Update documentation for SharedContext::maybe_collapsed_doc_value
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed May 10, 2021
1 parent 00f2bf4 commit 0851995
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/html/render/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ impl SharedContext<'_> {
Ok(())
}

/// Based on whether the `collapse-docs` pass was run, return either the `doc_value` or the
/// `collapsed_doc_value` of the given item.
/// Returns the `collapsed_doc_value` of the given item if this is the main crate, otherwise
/// returns the `doc_value`.
crate fn maybe_collapsed_doc_value<'a>(&self, item: &'a clean::Item) -> Option<String> {
if self.collapsed { item.collapsed_doc_value() } else { item.doc_value() }
}
Expand Down

0 comments on commit 0851995

Please sign in to comment.