From 9c3acd3028d32b6cf099e8d5dffe435f15f241a2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 19 May 2020 21:43:14 +0200 Subject: Cleanup --- crates/ra_assists/src/handlers/add_from_impl_for_enum.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'crates') diff --git a/crates/ra_assists/src/handlers/add_from_impl_for_enum.rs b/crates/ra_assists/src/handlers/add_from_impl_for_enum.rs index 6a49b7dbd..eb57b7231 100644 --- a/crates/ra_assists/src/handlers/add_from_impl_for_enum.rs +++ b/crates/ra_assists/src/handlers/add_from_impl_for_enum.rs @@ -1,6 +1,5 @@ use ra_ide_db::RootDatabase; use ra_syntax::ast::{self, AstNode, NameOwner}; -use stdx::format_to; use test_utils::tested_by; use crate::{utils::FamousDefs, AssistContext, AssistId, Assists}; @@ -35,7 +34,7 @@ pub(crate) fn add_from_impl_for_enum(acc: &mut Assists, ctx: &AssistContext) -> } let field_type = field_list.fields().next()?.type_ref()?; let path = match field_type { - ast::TypeRef::PathType(p) => p, + ast::TypeRef::PathType(it) => it, _ => return None, }; @@ -51,9 +50,7 @@ pub(crate) fn add_from_impl_for_enum(acc: &mut Assists, ctx: &AssistContext) -> target, |edit| { let start_offset = variant.parent_enum().syntax().text_range().end(); - let mut buf = String::new(); - format_to!( - buf, + let buf = format!( r#" impl From<{0}> for {1} {{ -- cgit v1.2.3