mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
More manual clippy fixes
This commit is contained in:
parent
b8ddcb0652
commit
eceaf94f19
32 changed files with 141 additions and 159 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue