Skip to content

Commit 4800afa

Browse files
committed
Cleanup
1 parent dc7eb0e commit 4800afa

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

Diff for: src/librustdoc/clean/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,8 @@ impl<'a, 'tcx> Clean<FnDecl> for (DefId, ty::PolyFnSig<'tcx>) {
19011901
vec![].into_iter()
19021902
} else {
19031903
cx.tcx.fn_arg_names(did).into_iter()
1904-
}.peekable();
1904+
};
1905+
19051906
FnDecl {
19061907
output: Return(sig.skip_binder().output().clean(cx)),
19071908
attrs: Attributes::default(),

Diff for: src/librustdoc/html/format.rs

+2-13
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ fn fmt_type(t: &clean::Type, f: &mut fmt::Formatter, use_absolute: bool) -> fmt:
581581
}
582582
many => {
583583
primitive_link(f, PrimitiveType::Tuple, "(")?;
584-
fmt::Display::fmt(&CommaSep(&many), f)?;
584+
fmt::Display::fmt(&CommaSep(many), f)?;
585585
primitive_link(f, PrimitiveType::Tuple, ")")
586586
}
587587
}
@@ -667,18 +667,7 @@ fn fmt_type(t: &clean::Type, f: &mut fmt::Formatter, use_absolute: bool) -> fmt:
667667
}
668668
}
669669
clean::ImplTrait(ref bounds) => {
670-
write!(f, "impl ")?;
671-
for (i, bound) in bounds.iter().enumerate() {
672-
if i != 0 {
673-
write!(f, " + ")?;
674-
}
675-
if f.alternate() {
676-
write!(f, "{:#}", *bound)?;
677-
} else {
678-
write!(f, "{}", *bound)?;
679-
}
680-
}
681-
Ok(())
670+
write!(f, "impl {}", TyParamBounds(bounds))
682671
}
683672
clean::QPath { ref name, ref self_type, ref trait_ } => {
684673
let should_show_cast = match *trait_ {

0 commit comments

Comments
 (0)