This commit is contained in:
parent
2a61a989d5
commit
94a26f3c9c
3 changed files with 35 additions and 1 deletions
|
|
@ -70,7 +70,11 @@ pub fn rewrite_comment(orig: &str, block_style: bool, width: usize, offset: usiz
|
|||
if line.len() > max_chars {
|
||||
acc.push_str(&rewrite_string(line, &fmt));
|
||||
} else {
|
||||
acc.push_str(line);
|
||||
if line.len() == 0 {
|
||||
acc.pop(); // Remove space if this is an empty comment.
|
||||
} else {
|
||||
acc.push_str(line);
|
||||
}
|
||||
}
|
||||
|
||||
(false, acc)
|
||||
|
|
|
|||
|
|
@ -68,3 +68,18 @@ fn issue201() {
|
|||
fn issue201_2() {
|
||||
let s = S{a: S2{ .. c}, .. b};
|
||||
}
|
||||
|
||||
fn issue278() {
|
||||
let s = S {
|
||||
a: 0,
|
||||
//
|
||||
b: 0,
|
||||
};
|
||||
let s1 = S {
|
||||
a: 0,
|
||||
// foo
|
||||
//
|
||||
// bar
|
||||
b: 0,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,3 +86,18 @@ fn issue201() {
|
|||
fn issue201_2() {
|
||||
let s = S { a: S2 { ..c }, ..b };
|
||||
}
|
||||
|
||||
fn issue278() {
|
||||
let s = S {
|
||||
a: 0,
|
||||
//
|
||||
b: 0,
|
||||
};
|
||||
let s1 = S {
|
||||
a: 0,
|
||||
// foo
|
||||
//
|
||||
// bar
|
||||
b: 0,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue