diff options
Diffstat (limited to 'rustfmt-core/src/comment.rs')
| -rw-r--r-- | rustfmt-core/src/comment.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rustfmt-core/src/comment.rs b/rustfmt-core/src/comment.rs index 512863c88be..67678f59074 100644 --- a/rustfmt-core/src/comment.rs +++ b/rustfmt-core/src/comment.rs @@ -466,7 +466,7 @@ fn rewrite_comment_inner( } result.push_str(closer); - if result == opener && result.ends_with(' ') { + if result.ends_with(opener) && opener.ends_with(' ') { // Trailing space. result.pop(); } |
