Fix clippy::identity_conversion

This commit is contained in:
Alan Du 2019-06-03 10:21:08 -04:00
parent ed3d93b875
commit 40424d4222
16 changed files with 49 additions and 59 deletions

View file

@ -21,8 +21,7 @@ pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option<Cal
let function = match calling_node {
FnCallNode::CallExpr(expr) => {
//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

View file

@ -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())