summaryrefslogtreecommitdiff
path: root/cli/ops
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-04-30 22:30:40 -0400
committerGitHub <noreply@github.com>2024-05-01 02:30:40 +0000
commit486437fee1ac53610a901b07bda91909844ec9ab (patch)
tree06f13c58b2cf1be9fd0bbf1ed030ce05d67255f3 /cli/ops
parentf2216c90a76775f7af6fa06b96b6e56dc5810284 (diff)
refactor(jupyter): move communication methods out of data structs (#23622)
Moves the communication methods out of the data structs and onto the `Connection` struct.
Diffstat (limited to 'cli/ops')
-rw-r--r--cli/ops/jupyter.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/cli/ops/jupyter.rs b/cli/ops/jupyter.rs
index 1d727c33f..e7e206de5 100644
--- a/cli/ops/jupyter.rs
+++ b/cli/ops/jupyter.rs
@@ -50,12 +50,16 @@ pub async fn op_jupyter_broadcast(
let maybe_last_request = last_execution_request.borrow().clone();
if let Some(last_request) = maybe_last_request {
- last_request
- .new_message(&message_type)
- .with_content(content)
- .with_metadata(metadata)
- .with_buffers(buffers.into_iter().map(|b| b.to_vec().into()).collect())
- .send(&mut *iopub_socket.lock().await)
+ (*iopub_socket.lock().await)
+ .send(
+ &last_request
+ .new_message(&message_type)
+ .with_content(content)
+ .with_metadata(metadata)
+ .with_buffers(
+ buffers.into_iter().map(|b| b.to_vec().into()).collect(),
+ ),
+ )
.await?;
}