From 484936bbfcb09c357569198f9a5a21deed8dd041 Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Tue, 22 Feb 2022 10:30:59 +1100 Subject: [PATCH] Address review comments --- src/librustdoc/html/format.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 699be93b1230f..9faf5431a6eba 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -282,18 +282,18 @@ crate fn print_where_clause<'a, 'tcx: 'a>( match pred { clean::WherePredicate::BoundPredicate { ty, bounds, bound_params } => { let bounds = bounds; - let for_prefix = match bound_params.len() { - 0 => String::new(), - _ if f.alternate() => { - format!( - "for<{:#}> ", - comma_sep(bound_params.iter().map(|lt| lt.print()), true) - ) - } - _ => format!( + let for_prefix = if bound_params.is_empty() { + String::new() + } else if f.alternate() { + format!( + "for<{:#}> ", + comma_sep(bound_params.iter().map(|lt| lt.print()), true) + ) + } else { + format!( "for<{}> ", comma_sep(bound_params.iter().map(|lt| lt.print()), true) - ), + ) }; if f.alternate() {