diff --git a/src/types.rs b/src/types.rs index 7c4b7a606a4..e4317241b31 100644 --- a/src/types.rs +++ b/src/types.rs @@ -22,7 +22,11 @@ use crate::rewrite::{Rewrite, RewriteContext, RewriteError, RewriteErrorExt, Rew use crate::shape::Shape; use crate::source_map::SpanUtils; use crate::spanned::Spanned; -use crate::utils::{colon_spaces, extra_offset, first_line_width, format_extern, format_mutability, is_absolute_decl_path, is_ty_kind_with_absolute_decl, last_line_extendable, last_line_width, mk_sp, rewrite_ident}; +use crate::utils::{ + colon_spaces, extra_offset, first_line_width, format_extern, format_mutability, + is_absolute_decl_path, is_ty_kind_with_absolute_decl, last_line_extendable, last_line_width, + mk_sp, rewrite_ident, +}; #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub(crate) enum PathContext { diff --git a/src/utils.rs b/src/utils.rs index 65b7a78cd78..be949d7f717 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -6,10 +6,10 @@ use rustc_ast::ast::{ }; use rustc_ast::ptr; use rustc_ast_pretty::pprust; -use rustc_span::{sym, symbol, BytePos, LocalExpnId, Span, Symbol, SyntaxContext}; +use rustc_span::{BytePos, LocalExpnId, Span, Symbol, SyntaxContext, sym, symbol}; use unicode_width::UnicodeWidthStr; -use crate::comment::{filter_normal_code, CharClasses, FullCodeCharKind, LineClasses}; +use crate::comment::{CharClasses, FullCodeCharKind, LineClasses, filter_normal_code}; use crate::config::{Config, StyleEdition}; use crate::rewrite::RewriteContext; use crate::shape::{Indent, Shape}; @@ -717,7 +717,7 @@ mod test { } -pub fn is_absolute_decl_path(path :&ast::Path) -> bool { +pub fn is_absolute_decl_path(path: &ast::Path) -> bool { let segments = &path.segments; match segments.first() { Some(path_segment) => path_segment.ident.name == symbol::kw::PathRoot,