diff options
author | ivan770 <[email protected]> | 2021-03-30 11:58:41 +0100 |
---|---|---|
committer | ivan770 <[email protected]> | 2021-03-30 11:58:41 +0100 |
commit | 4fcba8b1bf1b94839902c0803501163b7628b33d (patch) | |
tree | 68496f0ada2164764e319c4b8e6ce592a28823a0 | |
parent | 6ef6e4dee1f01f60a3aacdd34c55fc2c5d7c23b6 (diff) |
Fix code style
-rw-r--r-- | crates/ide/src/hover.rs | 1 | ||||
-rw-r--r-- | crates/ide/src/move_item.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index 3c951c507..02a1a5b37 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs | |||
@@ -470,6 +470,7 @@ fn find_std_module(famous_defs: &FamousDefs, name: &str) -> Option<hir::Module> | |||
470 | 470 | ||
471 | fn pick_best(tokens: TokenAtOffset<SyntaxToken>) -> Option<SyntaxToken> { | 471 | fn pick_best(tokens: TokenAtOffset<SyntaxToken>) -> Option<SyntaxToken> { |
472 | return tokens.max_by_key(priority); | 472 | return tokens.max_by_key(priority); |
473 | |||
473 | fn priority(n: &SyntaxToken) -> usize { | 474 | fn priority(n: &SyntaxToken) -> usize { |
474 | match n.kind() { | 475 | match n.kind() { |
475 | IDENT | INT_NUMBER | LIFETIME_IDENT | T![self] | T![super] | T![crate] => 3, | 476 | IDENT | INT_NUMBER | LIFETIME_IDENT | T![self] | T![super] | T![crate] => 3, |
diff --git a/crates/ide/src/move_item.rs b/crates/ide/src/move_item.rs index 089383aa6..d36dcd4e4 100644 --- a/crates/ide/src/move_item.rs +++ b/crates/ide/src/move_item.rs | |||
@@ -143,6 +143,7 @@ fn replace_nodes(first: &SyntaxNode, second: &SyntaxNode) -> TextEdit { | |||
143 | 143 | ||
144 | fn pick_best(tokens: TokenAtOffset<SyntaxToken>) -> Option<SyntaxToken> { | 144 | fn pick_best(tokens: TokenAtOffset<SyntaxToken>) -> Option<SyntaxToken> { |
145 | return tokens.max_by_key(priority); | 145 | return tokens.max_by_key(priority); |
146 | |||
146 | fn priority(n: &SyntaxToken) -> usize { | 147 | fn priority(n: &SyntaxToken) -> usize { |
147 | match n.kind() { | 148 | match n.kind() { |
148 | SyntaxKind::IDENT | SyntaxKind::LIFETIME_IDENT => 2, | 149 | SyntaxKind::IDENT | SyntaxKind::LIFETIME_IDENT => 2, |