aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-01-14 14:27:58 +0000
committerGitHub <[email protected]>2020-01-14 14:27:58 +0000
commite406f2bed66cbe13ef6441a3fb84791a3ca09299 (patch)
tree0c983c52ab17aaefdf84682f1a40e383b596163b /crates/ra_assists
parente5cb836448d818275275d73dedbddfdac77abe2e (diff)
parent325912f01ea11ae2e16e01ffaa7ff71329ff1702 (diff)
Merge #2839
2839: Tweak add_custom_impl r=matklad a=kjeremy Display a nicer label and categorize Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates/ra_assists')
-rw-r--r--crates/ra_assists/src/assists/add_custom_impl.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_assists/src/assists/add_custom_impl.rs b/crates/ra_assists/src/assists/add_custom_impl.rs
index 9b8955710..52e8c693d 100644
--- a/crates/ra_assists/src/assists/add_custom_impl.rs
+++ b/crates/ra_assists/src/assists/add_custom_impl.rs
@@ -49,7 +49,10 @@ pub(crate) fn add_custom_impl(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist
49 let annotated_name = annotated.syntax().text().to_string(); 49 let annotated_name = annotated.syntax().text().to_string();
50 let start_offset = annotated.syntax().parent()?.text_range().end(); 50 let start_offset = annotated.syntax().parent()?.text_range().end();
51 51
52 ctx.add_assist(AssistId("add_custom_impl"), "add custom impl", |edit| { 52 let label =
53 format!("Add Custom impl '{}' for '{}'", trait_token.text().as_str(), annotated_name);
54
55 ctx.add_assist(AssistId("add_custom_impl"), label, |edit| {
53 edit.target(attr.syntax().text_range()); 56 edit.target(attr.syntax().text_range());
54 57
55 let new_attr_input = input 58 let new_attr_input = input