♻️ refactor: split up large function at clippy's behest

main
_ 2021-03-21 03:40:45 +00:00
parent 50fc509c8b
commit c6b2418a49
1 changed files with 9 additions and 1 deletions

View File

@ -194,7 +194,6 @@ pub async fn run_server (
};
use arc_swap::ArcSwap;
use http::status::StatusCode;
let asset_root = asset_root.unwrap_or_else (PathBuf::new);
@ -238,6 +237,15 @@ pub async fn run_server (
client,
});
run_server_loop (state, shutdown_oneshot).await
}
async fn run_server_loop (
state: Arc <State>,
shutdown_oneshot: oneshot::Receiver <()>,
) -> Result <(), ServerError> {
use http::status::StatusCode;
let mut backoff_delay = 0;
let mut shutdown_oneshot = shutdown_oneshot.fuse ();