diff options
author | kjeremy <[email protected]> | 2019-12-20 20:14:30 +0000 |
---|---|---|
committer | kjeremy <[email protected]> | 2019-12-20 20:14:30 +0000 |
commit | 0d5d63a80ea08f2af439bcc72fff9b24d144c70d (patch) | |
tree | 688102f3cfdec260f5164d60f0bb95e33ebe9674 /crates/ra_ide/src/completion/completion_context.rs | |
parent | 9467f81c588bf7a62ec882f293e0870c187b368b (diff) |
Clippy lints
Diffstat (limited to 'crates/ra_ide/src/completion/completion_context.rs')
-rw-r--r-- | crates/ra_ide/src/completion/completion_context.rs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs index 981da2b79..4894ea2f6 100644 --- a/crates/ra_ide/src/completion/completion_context.rs +++ b/crates/ra_ide/src/completion/completion_context.rs | |||
@@ -239,16 +239,15 @@ impl<'a> CompletionContext<'a> { | |||
239 | .expr() | 239 | .expr() |
240 | .map(|e| e.syntax().text_range()) | 240 | .map(|e| e.syntax().text_range()) |
241 | .and_then(|r| find_node_with_range(original_file.syntax(), r)); | 241 | .and_then(|r| find_node_with_range(original_file.syntax(), r)); |
242 | self.dot_receiver_is_ambiguous_float_literal = if let Some(ast::Expr::Literal(l)) = | 242 | self.dot_receiver_is_ambiguous_float_literal = |
243 | &self.dot_receiver | 243 | if let Some(ast::Expr::Literal(l)) = &self.dot_receiver { |
244 | { | 244 | match l.kind() { |
245 | match l.kind() { | 245 | ast::LiteralKind::FloatNumber { .. } => l.token().text().ends_with('.'), |
246 | ast::LiteralKind::FloatNumber { suffix: _ } => l.token().text().ends_with('.'), | 246 | _ => false, |
247 | _ => false, | 247 | } |
248 | } else { | ||
249 | false | ||
248 | } | 250 | } |
249 | } else { | ||
250 | false | ||
251 | } | ||
252 | } | 251 | } |
253 | if let Some(method_call_expr) = ast::MethodCallExpr::cast(parent) { | 252 | if let Some(method_call_expr) = ast::MethodCallExpr::cast(parent) { |
254 | // As above | 253 | // As above |