Skip to content

Commit

Permalink
fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
FwP-IDN committed Feb 18, 2025
1 parent 5b93020 commit d87b0b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit d87b0b2

Please sign in to comment.