From 40424d4222d4630bc53294d10f1718f2d3d300de Mon Sep 17 00:00:00 2001 From: Alan Du Date: Mon, 3 Jun 2019 10:21:08 -0400 Subject: Fix clippy::identity_conversion --- crates/ra_ide_api/src/call_info.rs | 3 +-- crates/ra_ide_api/src/typing.rs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide_api') 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 { //FIXME: apply subst - let (callable_def, _subst) = - analyzer.type_of(db, expr.expr()?.into())?.as_callable()?; + let (callable_def, _subst) = analyzer.type_of(db, expr.expr()?)?.as_callable()?; match callable_def { hir::CallableDef::Function(it) => it, //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< let mut edit = TextEditBuilder::default(); edit.replace( TextRange::from_to(position.offset - current_indent_len, position.offset), - target_indent.into(), + target_indent, ); let res = SourceChange::source_file_edit_from("reindent dot", position.file_id, edit.finish()) -- cgit v1.2.3