Use read() over read_with() to improve readability in simple cases (#31455)

Follow up to: #31263 

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2025-05-26 16:14:07 -04:00 committed by GitHub
parent 5bafb2b160
commit 534bb0620d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 80 additions and 94 deletions

View file

@ -842,9 +842,10 @@ impl LspLogView {
) {
let typ = self
.log_store
.read_with(cx, |v, _| {
v.language_servers.get(&server_id).map(|v| v.log_level)
})
.read(cx)
.language_servers
.get(&server_id)
.map(|v| v.log_level)
.unwrap_or(MessageType::LOG);
let log_contents = self
.log_store