From 93a8fcf7a8328054e47e8775c94552a488a5ff58 Mon Sep 17 00:00:00 2001 From: Jake Vossen Date: Fri, 1 Apr 2022 14:22:49 -0600 Subject: [PATCH] enum variant wording --- .../src/handlers/generate_enum_is_method.rs | 6 +++--- .../src/handlers/generate_enum_projection_method.rs | 10 +++++----- .../src/handlers/generate_from_impl_for_enum.rs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/ide_assists/src/handlers/generate_enum_is_method.rs b/crates/ide_assists/src/handlers/generate_enum_is_method.rs index 7dc1e4df28..28e0b433a6 100644 --- a/crates/ide_assists/src/handlers/generate_enum_is_method.rs +++ b/crates/ide_assists/src/handlers/generate_enum_is_method.rs @@ -10,7 +10,7 @@ use crate::{ // Assist: generate_enum_is_method // -// Generate an `is_` method for an enum variant. +// Generate an `is_` method for this enum variant. // // ``` // enum Version { @@ -56,9 +56,9 @@ pub(crate) fn generate_enum_is_method(acc: &mut Assists, ctx: &AssistContext) -> let target = variant.syntax().text_range(); acc.add_group( - &GroupLabel("Generate `is_`,`as_`,`try_into_`".to_owned()), + &GroupLabel("Generate an `is_`,`as_`, or `try_into_` for this enum variant".to_owned()), AssistId("generate_enum_is_method", AssistKind::Generate), - "Generate an `is_` method for an enum variant", + "Generate an `is_` method for this enum variant", target, |builder| { let vis = parent_enum.visibility().map_or(String::new(), |v| format!("{} ", v)); diff --git a/crates/ide_assists/src/handlers/generate_enum_projection_method.rs b/crates/ide_assists/src/handlers/generate_enum_projection_method.rs index fdaa791340..fe7a3cd535 100644 --- a/crates/ide_assists/src/handlers/generate_enum_projection_method.rs +++ b/crates/ide_assists/src/handlers/generate_enum_projection_method.rs @@ -11,7 +11,7 @@ use crate::{ // Assist: generate_enum_try_into_method // -// Generate an `try_into_` method for an enum variant. +// Generate a `try_into_` method for this enum variant. // // ``` // enum Value { @@ -41,7 +41,7 @@ pub(crate) fn generate_enum_try_into_method(acc: &mut Assists, ctx: &AssistConte acc, ctx, "generate_enum_try_into_method", - "Generate an `try_into_` method for an enum variant", + "Generate a `try_into_` method for this enum variant", ProjectionProps { fn_name_prefix: "try_into", self_param: "self", @@ -55,7 +55,7 @@ pub(crate) fn generate_enum_try_into_method(acc: &mut Assists, ctx: &AssistConte // Assist: generate_enum_as_method // -// Generate an `as_` method for an enum variant. +// Generate an `as_` method for this enum variant. // // ``` // enum Value { @@ -85,7 +85,7 @@ pub(crate) fn generate_enum_as_method(acc: &mut Assists, ctx: &AssistContext) -> acc, ctx, "generate_enum_as_method", - "Generate an `as_` method for an enum variant", + "Generate an `as_` method for this enum variant", ProjectionProps { fn_name_prefix: "as", self_param: "&self", @@ -141,7 +141,7 @@ fn generate_enum_projection_method( let target = variant.syntax().text_range(); acc.add_group( - &GroupLabel("Generate `is_`,`as_`,`try_into_`".to_owned()), + &GroupLabel("Generate an `is_`,`as_`, or `try_into_` for this enum variant".to_owned()), AssistId(assist_id, AssistKind::Generate), assist_description, target, diff --git a/crates/ide_assists/src/handlers/generate_from_impl_for_enum.rs b/crates/ide_assists/src/handlers/generate_from_impl_for_enum.rs index 5bb7edb0a7..f7be323824 100644 --- a/crates/ide_assists/src/handlers/generate_from_impl_for_enum.rs +++ b/crates/ide_assists/src/handlers/generate_from_impl_for_enum.rs @@ -5,7 +5,7 @@ use crate::{utils::generate_trait_impl_text, AssistContext, AssistId, AssistKind // Assist: generate_from_impl_for_enum // -// Adds a From impl for an enum variant with one tuple field. +// Adds a From impl for this enum variant with one tuple field. // // ``` // enum A { $0One(u32) }