Fixed warnings when compiling for Windows

This commit is contained in:
Thorsten Sommer 2025-02-26 13:51:41 +01:00
parent b984b4432e
commit dcc616f5f0
No known key found for this signature in database
GPG Key ID: B0B7E2FC074BF1F5

View File

@ -1,4 +1,6 @@
#[cfg(unix)]
use std::collections::HashSet;
use log::info;
use once_cell::sync::Lazy;
use rocket::config::Shutdown;
@ -27,7 +29,7 @@ pub fn start_runtime_api() {
info!("Try to start the API server on 'http://localhost:{api_port}'...");
// The shutdown configuration for the runtime API server:
let mut shutdown = Shutdown {
let shutdown = Shutdown {
// We do not want to use the Ctrl+C signal to stop the server:
ctrlc: false,
@ -37,6 +39,9 @@ pub fn start_runtime_api() {
#[cfg(unix)]
{
// Now, shutdown needs to be mutable:
let mut shutdown = shutdown;
// We do not want to use the termination signal to stop the server.
// This option, however, is only available on Unix systems:
shutdown.signals = HashSet::new();