From 1eff5eae2f3cdfc0e7fcf653d7eee8f633dd0acc Mon Sep 17 00:00:00 2001 From: Linus Karl Date: Wed, 7 Feb 2024 11:17:11 +0100 Subject: [PATCH] fix formatting --- src/client/mod.rs | 12 +++++++----- src/server/commands.rs | 16 ++++++++-------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/client/mod.rs b/src/client/mod.rs index b4c6cbe..4572c12 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -94,11 +94,13 @@ fn set_loglevel(opt: &BaseOptions) -> Result<(), tracing::dispatcher::SetGlobalD pub async fn client_start(start_opts: ClientStartCommand) -> anyhow::Result<()> { set_loglevel(&start_opts.base)?; Toplevel::new(|s| async move { - s.start(SubsystemBuilder::new("Eventloop", |subsys| event_loop(subsys, start_opts))); - }) - .catch_signals() - .handle_shutdown_requests(Duration::from_millis(1000)) - .await?; + s.start(SubsystemBuilder::new("Eventloop", |subsys| { + event_loop(subsys, start_opts) + })); + }) + .catch_signals() + .handle_shutdown_requests(Duration::from_millis(1000)) + .await?; Ok(()) } diff --git a/src/server/commands.rs b/src/server/commands.rs index 8ba3dc5..d4b0853 100644 --- a/src/server/commands.rs +++ b/src/server/commands.rs @@ -7,8 +7,8 @@ use crate::cli::{ use crate::server::protocol::WirespiderServerState; use anyhow::Context; -use tokio_graceful_shutdown::{SubsystemBuilder, SubsystemHandle}; use tokio_graceful_shutdown::Toplevel; +use tokio_graceful_shutdown::{SubsystemBuilder, SubsystemHandle}; use tracing::metadata::LevelFilter; use tracing_error::ErrorLayer; use tracing_subscriber::prelude::*; @@ -50,13 +50,13 @@ pub async fn server_run(opt: ServerRunCommand) -> anyhow::Result<()> { debug!("Starting"); Toplevel::new(move |s| async move { - s.start(SubsystemBuilder::new("TonicService", move |handle| { - tonic_service(handle, opt.bind) - })); - }) - .catch_signals() - .handle_shutdown_requests(Duration::from_millis(1000)) - .await?; + s.start(SubsystemBuilder::new("TonicService", move |handle| { + tonic_service(handle, opt.bind) + })); + }) + .catch_signals() + .handle_shutdown_requests(Duration::from_millis(1000)) + .await?; Ok(()) }