Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-expand/src/files.rs')
-rw-r--r--crates/hir-expand/src/files.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/crates/hir-expand/src/files.rs b/crates/hir-expand/src/files.rs
index 3a26c62e1f..c34570fcb5 100644
--- a/crates/hir-expand/src/files.rs
+++ b/crates/hir-expand/src/files.rs
@@ -9,8 +9,9 @@ use span::{
use syntax::{AstNode, AstPtr, SyntaxNode, SyntaxNodePtr, SyntaxToken, TextRange, TextSize};
use crate::{
+ MacroFileIdExt, MacroKind,
db::{self, ExpandDatabase},
- map_node_range_up, map_node_range_up_rooted, span_for_offset, MacroFileIdExt, MacroKind,
+ map_node_range_up, map_node_range_up_rooted, span_for_offset,
};
/// `InFile<T>` stores a value of `T` inside a particular file/syntax tree.
@@ -365,11 +366,7 @@ impl InFile<SyntaxToken> {
// FIXME: Figure out an API that makes proper use of ctx, this only exists to
// keep pre-token map rewrite behaviour.
- if ctxt.is_root() {
- Some(range)
- } else {
- None
- }
+ if ctxt.is_root() { Some(range) } else { None }
}
}
}