From 1c359ab634edb81b51e3c7eadfb83d46c926e890 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 15:04:06 +0200 Subject: Replace SepBy with Itertools --- crates/ra_assists/src/handlers/generate_impl.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/ra_assists/src/handlers/generate_impl.rs') diff --git a/crates/ra_assists/src/handlers/generate_impl.rs b/crates/ra_assists/src/handlers/generate_impl.rs index d9b87c9c0..7162dc184 100644 --- a/crates/ra_assists/src/handlers/generate_impl.rs +++ b/crates/ra_assists/src/handlers/generate_impl.rs @@ -1,5 +1,6 @@ +use itertools::Itertools; use ra_syntax::ast::{self, AstNode, GenericParamsOwner, NameOwner}; -use stdx::{format_to, SepBy}; +use stdx::format_to; use crate::{AssistContext, AssistId, AssistKind, Assists}; @@ -50,7 +51,7 @@ pub(crate) fn generate_impl(acc: &mut Assists, ctx: &AssistContext) -> Option<() .filter_map(|it| it.name()) .map(|it| it.text().clone()); - let generic_params = lifetime_params.chain(type_params).sep_by(", "); + let generic_params = lifetime_params.chain(type_params).format(", "); format_to!(buf, "<{}>", generic_params) } match ctx.config.snippet_cap { -- cgit v1.2.3