hacky solution that makes the tests pass but should really be better

This commit is contained in:
Christopher Armstrong 2018-02-16 14:09:41 -06:00
parent 4528a570b8
commit f5c46559d6
3 changed files with 5 additions and 3 deletions

View File

@ -1203,7 +1203,9 @@ pub fn format_struct_struct(
one_line_budget,
)?;
if !items_str.contains('\n') && !result.contains('\n') && items_str.len() <= one_line_budget {
if !items_str.contains('\n') && !result.contains('\n') && items_str.len() <= one_line_budget
&& !items_str.contains("//")
{
Some(format!("{} {} }}", result, items_str))
} else {
Some(format!(

View File

@ -1,5 +1,5 @@
enum Issue2446 {
V {
f: u8, //
f: u8, // x
},
}

View File

@ -1,5 +1,5 @@
enum Issue2446 {
V {
f: u8, //
f: u8, // x
},
}