Skip to content

Commit df7d2be

Browse files
committed
Move Indent and Shape to shape.rs from lib.rs
1 parent 8974f89 commit df7d2be

17 files changed

+372
-358
lines changed

src/chains.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
/// .qux
7777
/// ```
7878
79-
use Shape;
79+
use shape::Shape;
8080
use config::IndentStyle;
8181
use expr::rewrite_call;
8282
use macros::convert_try_mac;

src/comment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ use std::{self, iter};
1414

1515
use syntax::codemap::Span;
1616

17-
use {Indent, Shape};
1817
use config::Config;
1918
use rewrite::RewriteContext;
19+
use shape::{Indent, Shape};
2020
use string::{rewrite_string, StringFormat};
2121
use utils::{first_line_width, last_line_width};
2222

@@ -928,7 +928,7 @@ fn remove_comment_header(comment: &str) -> &str {
928928
mod test {
929929
use super::{contains_comment, rewrite_comment, CharClasses, CodeCharKind, CommentCodeSlices,
930930
FindUncommented, FullCodeCharKind};
931-
use {Indent, Shape};
931+
use shape::{Indent, Shape};
932932

933933
#[test]
934934
fn char_classes() {

src/expr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use syntax::{ast, ptr};
1717
use syntax::codemap::{BytePos, CodeMap, Span};
1818
use syntax::parse::classify;
1919

20-
use {Indent, Shape, Spanned};
20+
use Spanned;
2121
use chains::rewrite_chain;
2222
use codemap::{LineRangeUtils, SpanUtils};
2323
use comment::{combine_strs_with_missing_comments, contains_comment, recover_comment_removed,
@@ -30,6 +30,7 @@ use lists::{definitive_tactic, itemize_list, shape_for_tactic, struct_lit_format
3030
use macros::{rewrite_macro, MacroArg, MacroPosition};
3131
use patterns::{can_be_overflowed_pat, TuplePatField};
3232
use rewrite::{Rewrite, RewriteContext};
33+
use shape::{Indent, Shape};
3334
use string::{rewrite_string, StringFormat};
3435
use types::{can_be_overflowed_type, rewrite_path, PathContext};
3536
use utils::{colon_spaces, contains_skip, extra_offset, first_line_width, inner_attributes,

src/imports.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ use std::cmp::Ordering;
1313
use syntax::ast;
1414
use syntax::codemap::{BytePos, Span};
1515

16-
use {Shape, Spanned};
16+
use Spanned;
1717
use codemap::SpanUtils;
1818
use comment::combine_strs_with_missing_comments;
1919
use config::IndentStyle;
2020
use lists::{definitive_tactic, itemize_list, write_list, DefinitiveListTactic, ListFormatting,
2121
ListItem, Separator, SeparatorPlace, SeparatorTactic};
2222
use rewrite::{Rewrite, RewriteContext};
23+
use shape::Shape;
2324
use types::{rewrite_path, PathContext};
2425
use utils::{format_visibility, mk_sp};
2526
use visitor::{rewrite_extern_crate, FmtVisitor};

src/items.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use syntax::{abi, ast, ptr, symbol};
1616
use syntax::ast::ImplItem;
1717
use syntax::codemap::{BytePos, Span};
1818

19-
use {Indent, Shape, Spanned};
19+
use Spanned;
2020
use codemap::{LineRangeUtils, SpanUtils};
2121
use comment::{combine_strs_with_missing_comments, contains_comment, recover_comment_removed,
2222
recover_missing_comment_in_span, rewrite_missing_comment, FindUncommented};
@@ -26,6 +26,7 @@ use expr::{format_expr, is_empty_block, is_simple_block_stmt, rewrite_assign_rhs
2626
use lists::{definitive_tactic, itemize_list, write_list, DefinitiveListTactic, ListFormatting,
2727
ListItem, ListTactic, Separator, SeparatorPlace, SeparatorTactic};
2828
use rewrite::{Rewrite, RewriteContext};
29+
use shape::{Indent, Shape};
2930
use types::join_bounds;
3031
use utils::{colon_spaces, contains_skip, end_typaram, first_line_width, format_abi,
3132
format_constness, format_defaultness, format_mutability, format_unsafety,

0 commit comments

Comments
 (0)