Clippy lint fixing

This commit is contained in:
2026-05-14 15:31:48 +01:00
parent 7b9d52e94d
commit a55053dc97
5 changed files with 67 additions and 55 deletions
+5 -5
View File
@@ -49,7 +49,7 @@ pub async fn api_process
// Perform this code on a GET request
.map(|state: Arc<Mutex<DataToSend>>, tx_handle: Sender<(bool,usize)>|
{
debug!("GET: {:?}", state);
debug!("GET: {state:?}");
let reply = state.as_ref();
let _ = tx_handle.send((true,0));
warp::reply::json(&reply) // Send the reply data (data_to_send formatted as JSON)
@@ -60,9 +60,9 @@ pub async fn api_process
.and(characters_filter)
.map(|name: String, characters: Arc<Mutex<HashMap<String, character::Character>>>|
{
let map = characters.lock().unwrap(); // TODO remove unwrap
let reply = map.get(&name).unwrap();
debug!("GET: name: {}", name);
let map = characters.lock().unwrap(); // TODO eh
let reply = map.get(&name).unwrap(); // TODO eh
debug!("GET: name: {name}");
warp::reply::json(&reply)
}).boxed();
let choice = warp::path("choice")
@@ -70,7 +70,7 @@ pub async fn api_process
.and(warp::body::json())
.and(tx_filter2)
.map(|index: usize, tx_handle: Sender<(bool,usize)>| {
debug!("Choice: {}", index);
debug!("Choice: {index}");
let _ = tx_handle.send((true,index));
let reply = "ack";
warp::reply::json(&reply)