We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b4778d commit 604764aCopy full SHA for 604764a
src/comment.rs
@@ -390,8 +390,10 @@ fn rewrite_comment_inner(
390
let code_block = {
391
let mut config = config.clone();
392
config.set().wrap_comments(false);
393
- ::format_code_block(&code_block_buffer, &config)
394
- .map_or_else(|| code_block_buffer.to_owned(), trim_custom_comment_prefix)
+ match ::format_code_block(&code_block_buffer, &config) {
+ Some(ref s) => trim_custom_comment_prefix(s),
395
+ None => trim_custom_comment_prefix(&code_block_buffer),
396
+ }
397
};
398
result.push_str(&join_code_block_with_comment_line_separator(&code_block));
399
code_block_buffer.clear();
0 commit comments