repl: Don't prefix free variables with _ (#16494)

This PR is a small refactor to remove the leading `_` for some free
variables, as this unintentionally marks them as unused to the compiler.

While the fields on the struct _are_ unused, the free variables should
participate in usage tracking, as we want to make sure they get stored
on the struct.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-08-19 19:15:27 -04:00 committed by GitHub
parent 6f5674691c
commit f7f7cd5bb9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -261,7 +261,7 @@ impl RunningKernel {
messages_rx.push(control_reply_rx);
messages_rx.push(shell_reply_rx);
let _iopub_task = cx.background_executor().spawn({
let iopub_task = cx.background_executor().spawn({
async move {
while let Ok(message) = iopub_socket.read().await {
iopub.send(message).await?;
@ -274,7 +274,7 @@ impl RunningKernel {
futures::channel::mpsc::channel(100);
let (mut shell_request_tx, mut shell_request_rx) = futures::channel::mpsc::channel(100);
let _routing_task = cx.background_executor().spawn({
let routing_task = cx.background_executor().spawn({
async move {
while let Some(message) = request_rx.next().await {
match message.content {
@ -292,7 +292,7 @@ impl RunningKernel {
}
});
let _shell_task = cx.background_executor().spawn({
let shell_task = cx.background_executor().spawn({
async move {
while let Some(message) = shell_request_rx.next().await {
shell_socket.send(message).await.ok();
@ -303,7 +303,7 @@ impl RunningKernel {
}
});
let _control_task = cx.background_executor().spawn({
let control_task = cx.background_executor().spawn({
async move {
while let Some(message) = control_request_rx.next().await {
control_socket.send(message).await.ok();
@ -319,10 +319,10 @@ impl RunningKernel {
process,
request_tx,
working_directory,
_shell_task,
_iopub_task,
_control_task,
_routing_task,
_shell_task: shell_task,
_iopub_task: iopub_task,
_control_task: control_task,
_routing_task: routing_task,
connection_path,
execution_state: ExecutionState::Busy,
kernel_info: None,