Skip to content

Commit

Permalink
repl: Don't prefix free variables with _ (#16494)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
maxdeviant authored Aug 19, 2024
1 parent 6f56746 commit f7f7cd5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions crates/repl/src/kernels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;
Expand All @@ -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 {
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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,
Expand Down

0 comments on commit f7f7cd5

Please sign in to comment.