format exceeded comments
This commit is contained in:
parent
8874c95a00
commit
faa41168a9
@ -696,7 +696,8 @@ pub fn format_impl(
|
||||
if is_impl_single_line(context, items, &result, &where_clause_str, item)? {
|
||||
result.push_str(&where_clause_str);
|
||||
if where_clause_str.contains('\n') || last_line_contains_single_line_comment(&result) {
|
||||
// if the where_clause contains extra comments AND there is only one where clause predicate
|
||||
// if the where_clause contains extra comments AND
|
||||
// there is only one where clause predicate
|
||||
// recover the suppressed comma in single line where_clause formatting
|
||||
if generics.where_clause.predicates.len() == 1 {
|
||||
result.push_str(",");
|
||||
|
Loading…
Reference in New Issue
Block a user