We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bdce630 commit bc3b585Copy full SHA for bc3b585
librubyfmt/src/comment_block.rs
@@ -36,11 +36,12 @@ impl CommentBlock {
36
}
37
38
pub fn apply_spaces(mut self, indent_depth: ColNumber) -> Self {
39
+ let indent = str::repeat(" ", indent_depth as _);
40
for comment in &mut self.comments {
41
// Ignore empty strings -- these represent blank lines between
42
// groups of comments
43
if !comment.is_empty() {
- *comment = str::repeat(" ", indent_depth as _) + comment
44
+ comment.insert_str(0, &indent);
45
46
47
self
0 commit comments