Skip to content

Commit 484936b

Browse files
committed
Address review comments
1 parent 79f2180 commit 484936b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/librustdoc/html/format.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -282,18 +282,18 @@ crate fn print_where_clause<'a, 'tcx: 'a>(
282282
match pred {
283283
clean::WherePredicate::BoundPredicate { ty, bounds, bound_params } => {
284284
let bounds = bounds;
285-
let for_prefix = match bound_params.len() {
286-
0 => String::new(),
287-
_ if f.alternate() => {
288-
format!(
289-
"for&lt;{:#}&gt; ",
290-
comma_sep(bound_params.iter().map(|lt| lt.print()), true)
291-
)
292-
}
293-
_ => format!(
285+
let for_prefix = if bound_params.is_empty() {
286+
String::new()
287+
} else if f.alternate() {
288+
format!(
289+
"for&lt;{:#}&gt; ",
290+
comma_sep(bound_params.iter().map(|lt| lt.print()), true)
291+
)
292+
} else {
293+
format!(
294294
"for&lt;{}&gt; ",
295295
comma_sep(bound_params.iter().map(|lt| lt.print()), true)
296-
),
296+
)
297297
};
298298

299299
if f.alternate() {

0 commit comments

Comments
 (0)