1
Fork 0

Address review comments

This commit is contained in:
Deadbeef 2022-02-22 10:30:59 +11:00
parent 79f2180928
commit 484936bbfc
No known key found for this signature in database
GPG key ID: 6D017A96D8E6C2F9

View file

@ -282,18 +282,18 @@ crate fn print_where_clause<'a, 'tcx: 'a>(
match pred { match pred {
clean::WherePredicate::BoundPredicate { ty, bounds, bound_params } => { clean::WherePredicate::BoundPredicate { ty, bounds, bound_params } => {
let bounds = bounds; let bounds = bounds;
let for_prefix = match bound_params.len() { let for_prefix = if bound_params.is_empty() {
0 => String::new(), String::new()
_ if f.alternate() => { } else if f.alternate() {
format!( format!(
"for&lt;{:#}&gt; ", "for&lt;{:#}&gt; ",
comma_sep(bound_params.iter().map(|lt| lt.print()), true) comma_sep(bound_params.iter().map(|lt| lt.print()), true)
) )
} } else {
_ => format!( format!(
"for&lt;{}&gt; ", "for&lt;{}&gt; ",
comma_sep(bound_params.iter().map(|lt| lt.print()), true) comma_sep(bound_params.iter().map(|lt| lt.print()), true)
), )
}; };
if f.alternate() { if f.alternate() {