Use read-only access methods for read-only entity operations (#31479)
Another follow-up to #31254 Release Notes: - N/A
This commit is contained in:
parent
4a577fff4a
commit
c208532693
79 changed files with 319 additions and 306 deletions
|
@ -232,7 +232,7 @@ impl DapStore {
|
|||
cx.spawn(async move |_, cx| {
|
||||
let response = request.await?;
|
||||
let binary = DebugAdapterBinary::from_proto(response)?;
|
||||
let mut ssh_command = ssh_client.update(cx, |ssh, _| {
|
||||
let mut ssh_command = ssh_client.read_with(cx, |ssh, _| {
|
||||
anyhow::Ok(SshCommand {
|
||||
arguments: ssh.ssh_args().context("SSH arguments not found")?,
|
||||
})
|
||||
|
@ -609,7 +609,7 @@ impl DapStore {
|
|||
});
|
||||
}
|
||||
VariableLookupKind::Expression => {
|
||||
let Ok(eval_task) = session.update(cx, |session, _| {
|
||||
let Ok(eval_task) = session.read_with(cx, |session, _| {
|
||||
session.mode.request_dap(EvaluateCommand {
|
||||
expression: inline_value_location.variable_name.clone(),
|
||||
frame_id: Some(stack_frame_id),
|
||||
|
@ -752,7 +752,7 @@ impl DapStore {
|
|||
let this = this.clone();
|
||||
async move |cx| {
|
||||
while let Some(message) = rx.next().await {
|
||||
this.update(cx, |this, _| {
|
||||
this.read_with(cx, |this, _| {
|
||||
if let Some((downstream, project_id)) = this.downstream_client.clone() {
|
||||
downstream
|
||||
.send(proto::LogToDebugConsole {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue