Skip to content

Commit 7be69ba

Browse files
committed
rustdoc: Make doc_value() dispatch to collapsed_doc_value()
They seem to be very similar; I think they don't need to be separate.
1 parent a77da2d commit 7be69ba

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/librustdoc/clean/types.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,18 +1077,7 @@ impl Attributes {
10771077
/// Finds the `doc` attribute as a NameValue and returns the corresponding
10781078
/// value found.
10791079
crate fn doc_value(&self) -> Option<String> {
1080-
let mut iter = self.doc_strings.iter();
1081-
1082-
let ori = iter.next()?;
1083-
let mut out = String::new();
1084-
add_doc_fragment(&mut out, ori);
1085-
for new_frag in iter {
1086-
if new_frag.kind != ori.kind || new_frag.parent_module != ori.parent_module {
1087-
break;
1088-
}
1089-
add_doc_fragment(&mut out, new_frag);
1090-
}
1091-
if out.is_empty() { None } else { Some(out) }
1080+
self.collapsed_doc_value()
10921081
}
10931082

10941083
/// Return the doc-comments on this item, grouped by the module they came from.

0 commit comments

Comments
 (0)