Formatting

This commit is contained in:
btwotwo 2022-10-06 16:53:17 +02:00
parent c660a5ce34
commit 8a92910f97
No known key found for this signature in database
GPG key ID: D456A0349D73A0A3
3 changed files with 19 additions and 11 deletions

View file

@ -1,6 +1,7 @@
//! Tools to work with format string literals for the `format_args!` family of macros.
use syntax::{
ast::{self, IsString}, TextRange, TextSize,
ast::{self, IsString},
TextRange, TextSize,
};
use super::node_ext::get_outer_macro_name;

View file

@ -2,8 +2,8 @@
use itertools::Itertools;
use parser::T;
use syntax::{
ast::{self, HasLoopBody, PathSegmentKind, VisibilityKind, NameRef},
AstNode, Preorder, RustLanguage, WalkEvent, AstToken,
ast::{self, HasLoopBody, NameRef, PathSegmentKind, VisibilityKind},
AstNode, AstToken, Preorder, RustLanguage, WalkEvent,
};
pub fn expr_as_name_ref(expr: &ast::Expr) -> Option<ast::NameRef> {
@ -463,4 +463,4 @@ pub fn get_outer_macro_name(string: &ast::String) -> Option<NameRef> {
let name = macro_call.path()?.segment()?.name_ref()?;
Some(name)
}
}