Enable clippy::bind_instead_of_map (#8723)

This PR enables the
[`clippy::bind_instead_of_map`](https://rust-lang.github.io/rust-clippy/master/index.html#/bind_instead_of_map)
rule and fixes the outstanding violations.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2024-03-02 16:10:34 -05:00
committed by GitHub
parent bf666af3a2
commit 87efb75e53
5 changed files with 14 additions and 16 deletions
+3 -3
View File
@@ -756,8 +756,8 @@ impl Render for LspLogToolbarItemView {
.trigger(Button::new(
"language_server_menu_header",
current_server
.and_then(|row| {
Some(Cow::Owned(format!(
.map(|row| {
Cow::Owned(format!(
"{} ({}) - {}",
row.server_name.0,
row.worktree_root_name,
@@ -766,7 +766,7 @@ impl Render for LspLogToolbarItemView {
} else {
SERVER_LOGS
},
)))
))
})
.unwrap_or_else(|| "No server selected".into()),
))