Fmt corrections
@@ -5,7 +5,7 @@ use ra_ide_db::RootDatabase;
use ra_prof::profile;
use ra_syntax::{
ast::{self, ArgListOwner, AstNode, TypeAscriptionOwner},
- match_ast, SmolStr, TextRange, NodeOrToken, SyntaxKind, Direction
+ match_ast, Direction, NodeOrToken, SmolStr, SyntaxKind, TextRange,
};
use crate::{FileId, FunctionSignature};
@@ -20,12 +20,7 @@ pub struct InlayHintsOptions {
impl Default for InlayHintsOptions {
fn default() -> Self {
- Self {
- type_hints: true,
- parameter_hints: true,
- chaining_hints: true,
- max_length: None
- }
+ Self { type_hints: true, parameter_hints: true, chaining_hints: true, max_length: None }
}
}
@@ -86,7 +81,8 @@ fn get_chaining_hints(
return None;
}
- let mut tokens = expr.syntax()
+ let mut tokens = expr
+ .syntax()
.siblings_with_tokens(Direction::Next)
.filter_map(NodeOrToken::into_token)
.filter(|t| match t.kind() {
@@ -1211,12 +1207,12 @@ fn main() {
assert_debug_snapshot!(analysis.inlay_hints(file_id, &InlayHintsOptions{ parameter_hints: false, type_hints: false, chaining_hints: true, max_length: None}).unwrap(), @r###"
[
InlayHint {
- range: [416; 465),
+ range: [403; 452),
kind: ChainingHint,
label: "B<X<i32, bool>>",
},
InlayHint {
- range: [416; 435),
+ range: [403; 422),
kind: ChainingHint,
label: "A<X<i32, bool>>",
},
