pub fn concat(doc_lines: &[SpannedString<'_>]) -> DocString {
    let mut doc = String::new();
    for doc_line in doc_lines {
        // Strip the `||| ` or `|||` prefix left over from tokenization
        // We assume that each line of documentation has a trailing new line
        doc.push_str(match doc_line.slice {
            doc_line if doc_line.starts_with("||| ") => &doc_line["||| ".len()..],
            doc_line if doc_line.starts_with("|||") => &doc_line["|||".len()..],
            doc_line => &doc_line[..],
        });
    }
    DocString::from(doc)
}
/// Concatenate a bunch of lines of documentation into a single string, removing
/// comment prefixes if they are found.
Concatenate a bunch of lines of documentation into a single string, removing
comment prefixes if they are found.
Concatenate a bunch of lines of documentation into a single string removing comment prefixes if they are found .
pub fn concat(doc_lines: &[SpannedString<'_>]) -> DocString {
    let mut doc = String::new();
    for doc_line in doc_lines {
        // Strip the `||| ` or `|||` prefix left over from tokenization
        // We assume that each line of documentation has a trailing new line
        doc.push_str(match doc_line.slice {
            doc_line if doc_line.starts_with("||| ") => &doc_line["||| ".len()..],
            doc_line if doc_line.starts_with("|||") => &doc_line["|||".len()..],
            doc_line => &doc_line[..],
        });
    }
    DocString::from(doc)
}
pub fn concat ( doc_lines : & [ SpannedString < ' _ > ] ) -> DocString { let mut doc = String :: new ( ) ; for doc_line in doc_lines { // Strip the `||| ` or `|||` prefix left over from tokenization // We assume that each line of documentation has a trailing new line doc . push_str ( match doc_line . slice { doc_line if doc_line . starts_with ( " " ) => & doc_line [ " " . len ( ) .. ] , doc_line if doc_line . starts_with ( " " ) => & doc_line [ " " . len ( ) .. ] , doc_line => & doc_line [ .. ] , } ) ; } DocString :: from ( doc ) }
Concatenate a bunch of lines of documentation into a single string, removing
comment prefixes if they are found.
Concatenate a bunch of lines of documentation into a single string removing comment prefixes if they are found .
doc_lines
&[SpannedString<'_>]