Skip to content

Commit 548b66c

Browse files
committed
style: re-format code to make test happy
1 parent e0c4eaf commit 548b66c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,11 @@ fn format_code_block(
388388
.snippet
389389
.rfind('}')
390390
// trim whitespace when using `fn_single_line=true`
391-
//
392-
.map(|i| formatted.snippet[..i].strip_suffix(char::is_whitespace).map_or(i, str::len))
391+
.map(|i| {
392+
formatted.snippet[..i]
393+
.strip_suffix(char::is_whitespace)
394+
.map_or(i, str::len)
395+
})
393396
.unwrap_or_else(|| formatted.snippet.len());
394397

395398
// It's possible that `block_len < FN_MAIN_PREFIX.len()`. This can happen if the code block was

0 commit comments

Comments
 (0)