Replace SepBy with Itertools

This commit is contained in:
Aleksey Kladov
2020-08-12 15:04:06 +02:00
parent 42a1692629
commit 1c359ab634
7 changed files with 30 additions and 94 deletions

View File

@@ -1,7 +1,7 @@
//! Various traits that are implemented by ast nodes.
//!
//! The implementations are usually trivial, and live in generated.rs
use stdx::SepBy;
use itertools::Itertools;
use crate::{
ast::{self, support, AstChildren, AstNode, AstToken},
@@ -119,8 +119,7 @@ impl CommentIter {
// of a line in markdown.
line[pos..end].to_owned()
})
.sep_by("\n")
.to_string();
.join("\n");
if has_comments {
Some(docs)