More manual clippy fixes

This commit is contained in:
Kirill Bulatov 2020-02-18 15:32:19 +02:00
parent b8ddcb0652
commit eceaf94f19
32 changed files with 141 additions and 159 deletions

View file

@ -101,9 +101,9 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String {
(src_ptr.value.range(), node.text().to_string().replace("\n", " "))
};
let macro_prefix = if src_ptr.file_id != file_id.into() { "!" } else { "" };
write!(
writeln!(
acc,
"{}{} '{}': {}\n",
"{}{} '{}': {}",
macro_prefix,
range,
ellipsize(text, 15),
@ -118,9 +118,9 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String {
for (src_ptr, mismatch) in &mismatches {
let range = src_ptr.value.range();
let macro_prefix = if src_ptr.file_id != file_id.into() { "!" } else { "" };
write!(
writeln!(
acc,
"{}{}: expected {}, got {}\n",
"{}{}: expected {}, got {}",
macro_prefix,
range,
mismatch.expected.display(&db),