Skip to content

Commit 9c3acd3

Browse files
committed
Cleanup
1 parent 0146a95 commit 9c3acd3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

crates/ra_assists/src/handlers/add_from_impl_for_enum.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use ra_ide_db::RootDatabase;
22
use ra_syntax::ast::{self, AstNode, NameOwner};
3-
use stdx::format_to;
43
use test_utils::tested_by;
54

65
use crate::{utils::FamousDefs, AssistContext, AssistId, Assists};
@@ -35,7 +34,7 @@ pub(crate) fn add_from_impl_for_enum(acc: &mut Assists, ctx: &AssistContext) ->
3534
}
3635
let field_type = field_list.fields().next()?.type_ref()?;
3736
let path = match field_type {
38-
ast::TypeRef::PathType(p) => p,
37+
ast::TypeRef::PathType(it) => it,
3938
_ => return None,
4039
};
4140

@@ -51,9 +50,7 @@ pub(crate) fn add_from_impl_for_enum(acc: &mut Assists, ctx: &AssistContext) ->
5150
target,
5251
|edit| {
5352
let start_offset = variant.parent_enum().syntax().text_range().end();
54-
let mut buf = String::new();
55-
format_to!(
56-
buf,
53+
let buf = format!(
5754
r#"
5855
5956
impl From<{0}> for {1} {{

0 commit comments

Comments
 (0)