]> git.lizzy.rs Git - rust.git/blobdiff - src/visitor.rs
Remove BlockIndentStyle::Inherit
[rust.git] / src / visitor.rs
index 6cd00ffc1f49b25023c391b3ed1a1c840b1b173c..2700287608de6f1944a3648c4f0fcdd5367fb476 100644 (file)
@@ -594,7 +594,7 @@ fn rewrite(&self, context: &RewriteContext, shape: Shape) -> Option<String> {
                     let comment = try_opt!(rewrite_comment(comment,
                                                            false,
                                                            Shape::legacy(context.config
-                                                                             .ideal_width -
+                                                                             .comment_width -
                                                                          shape.indent.width(),
                                                                          shape.indent),
                                                            context.config));
@@ -610,7 +610,7 @@ fn rewrite(&self, context: &RewriteContext, shape: Shape) -> Option<String> {
             if a_str.starts_with("//") {
                 a_str = try_opt!(rewrite_comment(&a_str,
                                                  false,
-                                                 Shape::legacy(context.config.ideal_width -
+                                                 Shape::legacy(context.config.comment_width -
                                                                shape.indent.width(),
                                                                shape.indent),
                                                  context.config));