Fix add_life_to_type label typo
This commit is contained in:
parent
dc8e2fea98
commit
d84912483d
@ -29,8 +29,7 @@ pub(crate) fn add_lifetime_to_type(acc: &mut Assists, ctx: &AssistContext) -> Op
|
||||
let node = ctx.find_node_at_offset::<ast::Adt>()?;
|
||||
let has_lifetime = node
|
||||
.generic_param_list()
|
||||
.map(|gen_list| gen_list.lifetime_params().count() > 0)
|
||||
.unwrap_or_default();
|
||||
.map_or(false, |gen_list| gen_list.lifetime_params().next().is_some());
|
||||
|
||||
if has_lifetime {
|
||||
return None;
|
||||
@ -41,7 +40,7 @@ pub(crate) fn add_lifetime_to_type(acc: &mut Assists, ctx: &AssistContext) -> Op
|
||||
|
||||
acc.add(
|
||||
AssistId("add_lifetime_to_type", AssistKind::Generate),
|
||||
"Add lifetime`",
|
||||
"Add lifetime",
|
||||
target,
|
||||
|builder| {
|
||||
match node.generic_param_list() {
|
||||
|
@ -26,7 +26,7 @@
|
||||
pub(crate) fn add_turbo_fish(acc: &mut Assists, ctx: &AssistContext) -> Option<()> {
|
||||
let ident = ctx.find_token_syntax_at_offset(SyntaxKind::IDENT).or_else(|| {
|
||||
let arg_list = ctx.find_node_at_offset::<ast::ArgList>()?;
|
||||
if arg_list.args().count() > 0 {
|
||||
if arg_list.args().next().is_some() {
|
||||
return None;
|
||||
}
|
||||
cov_mark::hit!(add_turbo_fish_after_call);
|
||||
|
Loading…
Reference in New Issue
Block a user