From 966c23f5290275ce17564f6027a17ec20cd6078f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Wed, 17 Mar 2021 01:27:56 +0100 Subject: avoid converting types into themselves via .into() (clippy::useless-conversion) example: let x: String = String::from("hello world").into(); --- crates/ide/src/diagnostics/fixes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ide/src') diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs index cbfc66ab3..2f840909c 100644 --- a/crates/ide/src/diagnostics/fixes.rs +++ b/crates/ide/src/diagnostics/fixes.rs @@ -180,7 +180,7 @@ fn missing_record_expr_field_fix( let def_id = sema.resolve_variant(record_lit)?; let module; let def_file_id; - let record_fields = match VariantDef::from(def_id) { + let record_fields = match def_id { VariantDef::Struct(s) => { module = s.module(sema.db); let source = s.source(sema.db)?; -- cgit v1.2.3