aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2019-06-03 15:21:08 +0100
committerAlan Du <[email protected]>2019-06-04 23:05:07 +0100
commit40424d4222d4630bc53294d10f1718f2d3d300de (patch)
tree4e27c7f2ce4a886e9a512b4986509b0927ae9ea1 /crates/ra_ide_api/src
parented3d93b875f25da6f81b8a107a8c200311240627 (diff)
Fix clippy::identity_conversion
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/call_info.rs3
-rw-r--r--crates/ra_ide_api/src/typing.rs2
2 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/call_info.rs b/crates/ra_ide_api/src/call_info.rs
index 0d1f92ca6..bd08e183d 100644
--- a/crates/ra_ide_api/src/call_info.rs
+++ b/crates/ra_ide_api/src/call_info.rs
@@ -21,8 +21,7 @@ pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option<Cal
21 let function = match calling_node { 21 let function = match calling_node {
22 FnCallNode::CallExpr(expr) => { 22 FnCallNode::CallExpr(expr) => {
23 //FIXME: apply subst 23 //FIXME: apply subst
24 let (callable_def, _subst) = 24 let (callable_def, _subst) = analyzer.type_of(db, expr.expr()?)?.as_callable()?;
25 analyzer.type_of(db, expr.expr()?.into())?.as_callable()?;
26 match callable_def { 25 match callable_def {
27 hir::CallableDef::Function(it) => it, 26 hir::CallableDef::Function(it) => it,
28 //FIXME: handle other callables 27 //FIXME: handle other callables
diff --git a/crates/ra_ide_api/src/typing.rs b/crates/ra_ide_api/src/typing.rs
index 63bc0cf88..3e35d8352 100644
--- a/crates/ra_ide_api/src/typing.rs
+++ b/crates/ra_ide_api/src/typing.rs
@@ -110,7 +110,7 @@ pub(crate) fn on_dot_typed(db: &RootDatabase, position: FilePosition) -> Option<
110 let mut edit = TextEditBuilder::default(); 110 let mut edit = TextEditBuilder::default();
111 edit.replace( 111 edit.replace(
112 TextRange::from_to(position.offset - current_indent_len, position.offset), 112 TextRange::from_to(position.offset - current_indent_len, position.offset),
113 target_indent.into(), 113 target_indent,
114 ); 114 );
115 115
116 let res = SourceChange::source_file_edit_from("reindent dot", position.file_id, edit.finish()) 116 let res = SourceChange::source_file_edit_from("reindent dot", position.file_id, edit.finish())