Put match arm guard on the next line if it contains new line
This commit is contained in:
parent
8955eb86e6
commit
496e958467
1 changed files with 3 additions and 1 deletions
|
|
@ -1650,7 +1650,9 @@ fn rewrite_guard(
|
|||
s.rewrite(context, cond_shape)
|
||||
})
|
||||
{
|
||||
return Some(format!(" if {}", cond_str));
|
||||
if !cond_str.contains('\n') {
|
||||
return Some(format!(" if {}", cond_str));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue