Enable clippy::map_identity
(#8731)
This PR enables the [`clippy::map_identity`](https://rust-lang.github.io/rust-clippy/master/index.html#/map_identity) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
d7962aa2d3
commit
52052f342b
3 changed files with 3 additions and 4 deletions
|
@ -340,7 +340,7 @@ impl LanguageServer {
|
||||||
io_tasks: Mutex::new(Some((input_task, output_task))),
|
io_tasks: Mutex::new(Some((input_task, output_task))),
|
||||||
output_done_rx: Mutex::new(Some(output_done_rx)),
|
output_done_rx: Mutex::new(Some(output_done_rx)),
|
||||||
root_path: root_path.to_path_buf(),
|
root_path: root_path.to_path_buf(),
|
||||||
server: Arc::new(Mutex::new(server.map(|server| server))),
|
server: Arc::new(Mutex::new(server)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3665,7 +3665,7 @@ impl Project {
|
||||||
proto::LspWorkStart {
|
proto::LspWorkStart {
|
||||||
token,
|
token,
|
||||||
message: report.message,
|
message: report.message,
|
||||||
percentage: report.percentage.map(|p| p),
|
percentage: report.percentage,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
|
@ -3691,7 +3691,7 @@ impl Project {
|
||||||
proto::LspWorkProgress {
|
proto::LspWorkProgress {
|
||||||
token,
|
token,
|
||||||
message: report.message,
|
message: report.message,
|
||||||
percentage: report.percentage.map(|p| p),
|
percentage: report.percentage,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
|
|
|
@ -105,7 +105,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> {
|
||||||
"clippy::manual_flatten",
|
"clippy::manual_flatten",
|
||||||
"clippy::map_entry",
|
"clippy::map_entry",
|
||||||
"clippy::map_flatten",
|
"clippy::map_flatten",
|
||||||
"clippy::map_identity",
|
|
||||||
"clippy::needless_arbitrary_self_type",
|
"clippy::needless_arbitrary_self_type",
|
||||||
"clippy::needless_borrowed_reference",
|
"clippy::needless_borrowed_reference",
|
||||||
"clippy::needless_lifetimes",
|
"clippy::needless_lifetimes",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue