clippy fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-10-14 11:12:30 +02:00
parent 75bc02d9db
commit e5456f873d
2 changed files with 2 additions and 2 deletions

View File

@ -417,7 +417,7 @@ pub fn get_doc_comments(attributes: &[syn::Attribute]) -> Result<(String, Span),
if attr.path.is_ident("doc") {
let doc: BareAssignment<syn::LitStr> = syn::parse2(attr.tokens.clone())?;
if !doc_comment.is_empty() {
doc_comment.push_str("\n");
doc_comment.push('\n');
}
doc_comment.push_str(doc.content.value().trim());
}

View File

@ -58,7 +58,7 @@ impl fmt::Display for ParameterError {
let s = item.to_string();
msg.reserve(s.len() + 1);
msg.push_str(&s);
msg.push_str("\n");
msg.push('\n');
}
write!(f, "{}", msg)