trims trailing space in doc comments (#2210)

This commit is contained in:
skim 2020-06-18 11:18:57 -07:00 committed by GitHub
parent 64e53a5502
commit 41409d2b86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3356,7 +3356,7 @@ fn check_duplicated_getter_and_setter_names(
fn format_doc_comments(comments: &str, js_doc_comments: Option<String>) -> String { fn format_doc_comments(comments: &str, js_doc_comments: Option<String>) -> String {
let body: String = comments.lines().map(|c| format!("*{}\n", c)).collect(); let body: String = comments.lines().map(|c| format!("*{}\n", c)).collect();
let doc = if let Some(docs) = js_doc_comments { let doc = if let Some(docs) = js_doc_comments {
docs.lines().map(|l| format!("* {} \n", l)).collect() docs.lines().map(|l| format!("* {}\n", l)).collect()
} else { } else {
String::new() String::new()
}; };