Put match arm guard on the next line if it contains new line

This commit is contained in:
topecongiro 2017-06-14 20:36:28 +09:00
parent 8955eb86e6
commit 496e958467

View file

@ -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));
}
}
}