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:
parent
5bafb2b160
commit
534bb0620d
9 changed files with 80 additions and 94 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue