summaryrefslogtreecommitdiff
path: root/cli/ops
diff options
context:
space:
mode:
authorKyle Kelley <rgbkrk@gmail.com>2024-05-29 15:46:47 -0700
committerGitHub <noreply@github.com>2024-05-29 22:46:47 +0000
commitcf611fbf548ea0bbd38c82ab02249b7a2aa3b3c9 (patch)
tree9496fd5f9ba9ada84bfcef29a919801a8df03517 /cli/ops
parent3d3722507e1964cba66161e3e2e7b538bc23f29c (diff)
chore: upgrade jupyter runtimelib to 0.11.0 (#24036)
Brings in: * More fully typed structures (for when we get to implementing more) * `with_metadata`, `with_buffers`, etc. from https://github.com/runtimed/runtimed/pull/99 --------- Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/ops')
-rw-r--r--cli/ops/jupyter.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/cli/ops/jupyter.rs b/cli/ops/jupyter.rs
index 57ca93ff4..edc5f64ec 100644
--- a/cli/ops/jupyter.rs
+++ b/cli/ops/jupyter.rs
@@ -4,10 +4,10 @@ use std::cell::RefCell;
use std::rc::Rc;
use std::sync::Arc;
-use runtimelib::JupyterMessage;
-use runtimelib::JupyterMessageContent;
-use runtimelib::KernelIoPubConnection;
-use runtimelib::StreamContent;
+use jupyter_runtime::JupyterMessage;
+use jupyter_runtime::JupyterMessageContent;
+use jupyter_runtime::KernelIoPubConnection;
+use jupyter_runtime::StreamContent;
use deno_core::error::AnyError;
use deno_core::op2;
@@ -65,12 +65,9 @@ pub async fn op_jupyter_broadcast(
err
})?;
- let mut jupyter_message = JupyterMessage::new(content, Some(&last_request));
-
- jupyter_message.metadata = metadata;
- jupyter_message.buffers =
- buffers.into_iter().map(|b| b.to_vec().into()).collect();
- jupyter_message.set_parent(last_request);
+ let jupyter_message = JupyterMessage::new(content, Some(&last_request))
+ .with_metadata(metadata)
+ .with_buffers(buffers.into_iter().map(|b| b.to_vec().into()).collect());
(iopub_connection.lock().await)
.send(jupyter_message)