mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
internal: refactor find_map diagnostic
This commit is contained in:
parent
24262f9ff6
commit
de1fc70ccd
6 changed files with 192 additions and 193 deletions
|
@ -1168,10 +1168,13 @@ impl Function {
|
|||
}
|
||||
BodyValidationDiagnostic::ReplaceFilterMapNextWithFindMap { method_call_expr } => {
|
||||
if let Ok(next_source_ptr) = source_map.expr_syntax(method_call_expr) {
|
||||
sink.push(ReplaceFilterMapNextWithFindMap {
|
||||
file: next_source_ptr.file_id,
|
||||
next_expr: next_source_ptr.value,
|
||||
});
|
||||
acc.push(
|
||||
ReplaceFilterMapNextWithFindMap {
|
||||
file: next_source_ptr.file_id,
|
||||
next_expr: next_source_ptr.value,
|
||||
}
|
||||
.into(),
|
||||
);
|
||||
}
|
||||
}
|
||||
BodyValidationDiagnostic::MismatchedArgCount { call_expr, expected, found } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue