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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 16 deletions

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()),
))