diff --git a/src/navico/report.rs b/src/navico/report.rs index c8d521b..8a53de3 100644 --- a/src/navico/report.rs +++ b/src/navico/report.rs @@ -9,8 +9,8 @@ use tokio::sync::mpsc::Sender; use tokio::time::{ sleep, sleep_until, Instant }; use tokio_graceful_shutdown::SubsystemHandle; -use crate::radar::{ DopplerMode, Legend, RadarError, RadarInfo }; -use crate::settings::{ ControlState, ControlType, Controls }; +use crate::radar::{ DopplerMode, RadarError, RadarInfo }; +use crate::settings::{ ControlState, ControlType }; use crate::util::{ c_string, c_wide_string, create_multicast }; use super::command::{ self, Command }; diff --git a/src/radar.rs b/src/radar.rs index 0f9a997..a1e4121 100644 --- a/src/radar.rs +++ b/src/radar.rs @@ -170,10 +170,6 @@ impl RadarInfo { self.legend = default_legend(doppler, self.pixel_values); } - pub fn set_controls(&mut self, controls: Controls) { - self.controls = Some(controls); - } - /// /// forward_output is activated in all starts of radars when cli args.output /// is true: diff --git a/src/web.rs b/src/web.rs index 64b3959..ed65fb7 100644 --- a/src/web.rs +++ b/src/web.rs @@ -1,13 +1,13 @@ use anyhow::anyhow; use axum::{ - extract::{ ConnectInfo, Host, Request, State }, + extract::{ ConnectInfo, Host, State }, http::{ StatusCode, Uri }, response::{ IntoResponse, Response }, routing::get, Json, Router, }; -use log::{ debug, info, trace }; +use log::debug; use miette::Result; use serde::{ Deserialize, Serialize }; use std::{ @@ -36,11 +36,6 @@ pub struct Web { shutdown_tx: tokio::sync::broadcast::Sender<()>, } -#[derive(Deserialize)] -struct WebSocketHandlerParameters { - key: String, -} - impl Web { pub fn new(port: u16, radars: Arc>) -> Self { let (shutdown_tx, _) = tokio::sync::broadcast::channel(1); @@ -52,7 +47,7 @@ impl Web { } } - pub async fn run(mut self, subsys: SubsystemHandle) -> Result<(), WebError> { + pub async fn run(self, subsys: SubsystemHandle) -> Result<(), WebError> { let listener = TcpListener::bind( SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), self.port) ).await.unwrap();