less symbols interner locks
This commit is contained in:
@@ -167,12 +167,13 @@ pub fn unindent_doc_fragments(docs: &mut [DocFragment]) {
|
||||
///
|
||||
/// Note: remove the trailing newline where appropriate
|
||||
pub fn add_doc_fragment(out: &mut String, frag: &DocFragment) {
|
||||
let s = frag.doc.as_str();
|
||||
let mut iter = s.lines();
|
||||
if s.is_empty() {
|
||||
if frag.doc == kw::Empty {
|
||||
out.push('\n');
|
||||
return;
|
||||
}
|
||||
let s = frag.doc.as_str();
|
||||
let mut iter = s.lines();
|
||||
|
||||
while let Some(line) = iter.next() {
|
||||
if line.chars().any(|c| !c.is_whitespace()) {
|
||||
assert!(line.len() >= frag.indent);
|
||||
|
||||
Reference in New Issue
Block a user