Skip to content

Commit a5a295a

Browse files
committed
chore: update rustc to nightly-2023-03-13 after rustc fix
* Now that <rust-lang/rust#108721> is landed on rust master, we can push the nightly version to bleeding edge again
1 parent d0d97c6 commit a5a295a

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

common/src/api/rest.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ where
6767
// Instead of giving the graceful shutduwn future to hyper directly, we
6868
// let the spawned task wait on it so that we can enforce a hyper timeout.
6969
let shutdown = ShutdownChannel::new();
70-
let mut shutdown_clone = shutdown.clone();
71-
let server_shutdown_fut = async move { shutdown_clone.recv().await };
72-
let graceful_server = server.with_graceful_shutdown(server_shutdown_fut);
70+
let graceful_server =
71+
server.with_graceful_shutdown(shutdown.clone().recv_owned());
7372
let task = LxTask::spawn_named_with_span(task_name, span, async move {
7473
tokio::pin!(graceful_server);
7574
tokio::select! {

common/src/shutdown.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ impl ShutdownChannel {
7070
}
7171
}
7272

73+
pub async fn recv_owned(mut self) {
74+
self.recv().await
75+
}
76+
7377
/// Immediately returns whether a shutdown signal has been sent.
7478
pub fn try_recv(&self) -> bool {
7579
self.inner.is_closed()

node/src/event_handler.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl EventHandler for NodeEventHandler {
7575
debug!("Event details: {event:?}");
7676

7777
// TODO(max): Should be possible to remove all clone()s once async event
78-
// handlilng is supported
78+
// handling is supported
7979
let lsp = self.lsp.clone();
8080
let wallet = self.wallet.clone();
8181
let channel_manager = self.channel_manager.clone();
@@ -93,6 +93,7 @@ impl EventHandler for NodeEventHandler {
9393
// node handles events. So we hack around it by breaking the contract
9494
// and just handling the event in a detached task. The long term fix is
9595
// to move to async event handling, which should be straightforward.
96+
#[allow(clippy::redundant_async_block)]
9697
LxTask::spawn(async move {
9798
handle_event(
9899
&lsp,

node/src/run.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,14 +371,13 @@ impl UserNode {
371371
args.network,
372372
activity_tx,
373373
);
374-
let mut owner_shutdown = shutdown.clone();
375374
let (owner_addr, owner_service_fut) = warp::serve(owner_routes)
376375
.tls()
377376
.preconfigured_tls(owner_tls)
378377
// A value of 0 indicates that the OS will assign a port for us
379378
.bind_with_graceful_shutdown(
380379
([127, 0, 0, 1], args.owner_port.unwrap_or(0)),
381-
async move { owner_shutdown.recv().await },
380+
shutdown.clone().recv_owned(),
382381
);
383382
let owner_port = owner_addr.port();
384383
info!("Owner service listening on port {}", owner_port);
@@ -387,12 +386,11 @@ impl UserNode {
387386
// TODO(phlip9): authenticate host<->node
388387
// Start warp service for host
389388
let host_routes = server::host_routes(args.user_pk, shutdown.clone());
390-
let mut host_shutdown = shutdown.clone();
391389
let (host_addr, host_service_fut) = warp::serve(host_routes)
392390
// A value of 0 indicates that the OS will assign a port for us
393391
.try_bind_with_graceful_shutdown(
394392
([127, 0, 0, 1], args.host_port.unwrap_or(0)),
395-
async move { host_shutdown.recv().await },
393+
shutdown.clone().recv_owned(),
396394
)
397395
.context("Failed to bind warp")?;
398396
let host_port = host_addr.port();

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
2-
channel = "nightly-2023-02-08"
2+
channel = "nightly-2023-03-13"
33
components = ["clippy", "rustfmt"]
44
targets = [
55
# # Remote azure host target

0 commit comments

Comments
 (0)